X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FThingy%2FDx.pm;h=596f5933abfbc3326caa2ca8dca6667c25b58ef1;hb=0662c6881129c63319b968a2fc9f36a84d518436;hp=e2f9776f2dcf0a3a4a54d70434e8975db10fd149;hpb=652422252c199b15fbbc500a4fff6f31dcf3b8d1;p=spider.git diff --git a/perl/Thingy/Dx.pm b/perl/Thingy/Dx.pm index e2f9776f..596f5933 100644 --- a/perl/Thingy/Dx.pm +++ b/perl/Thingy/Dx.pm @@ -31,10 +31,9 @@ sub gen_Aranea $thing->{f} = $sd->[0]; $thing->{c} = $sd->[1]; $thing->{b} = $sd->[4] unless $thing->{user}; - unless ($sd->[7] eq $main::mycall) { - $thing->{t} = sprintf("%X", $sd->[2] / 60); - $thing->{o} = $sd->[7]; - } + my $t = int($sd->[2] / 60); + $thing->{t} = sprintf("%X", $t) unless $t eq int($main::systime / 60); + $thing->{o} = $sd->[7] unless $sd->[7] eq $main::mycall; $thing->{i} = $sd->[3] if $sd->[3]; $thing->{Aranea} = Aranea::genmsg($thing, [qw(f c b t o i)]); } @@ -46,15 +45,17 @@ sub from_Aranea my $thing = shift; return unless $thing; my $t = hex($thing->{t}) if exists $thing->{t}; - $t ||= $thing->{time} / 60; # if it is an aranea generated + $t ||= int($thing->{time} / 60); # if it is an aranea generated + my $by = $thing->{b} || $thing->{fromuser} || $thing->{user} || $thing->{origin}; my @spot = Spot::prepare( $thing->{f}, $thing->{c}, $t*60, ($thing->{i} || ''), - ($thing->{b} || $thing->{fromuser} || $thing->{user} || $thing->{origin}), + $by, ($thing->{o} || $thing->{origin}), ); + $spot[4] = $by; # don't modify the spotter SSID $thing->{spotdata} = \@spot; return $thing; } @@ -68,7 +69,7 @@ sub gen_DXProt my $text = $sd->[3] || ' '; $text =~ s/\^/\%5E/g; my $t = $sd->[2]; - $thing->{DXProt} = sprintf "PC11^%.1f^$sd->[1]^%s^%s^%s^$sd->[4]^$sd->[7]^$hops^~", $sd->[0], cldate($t), ztime($t), $text; + $thing->{DXProt} = sprintf "PC11^%.1f^$sd->[1]^%s^%s^%s^$sd->[4]^$sd->[7]^H$hops^~", $sd->[0], cldate($t), ztime($t), $text; } return $thing->{DXProt}; } @@ -109,7 +110,7 @@ sub handle my $dxchan = shift; my $spot = $thing->{spotdata}; - if (Spot::dup(@$spot[0..4])) { + if (Spot::dup(@$spot[0..4,5])) { dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr'); return; }