From: djk Date: Mon, 8 Feb 1999 20:34:13 +0000 (+0000) Subject: various merges with the portable X-Git-Tag: R_1_24~18 X-Git-Url: http://dxspider.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c23c26e9c317f924994e1fead122708d3369091;p=spider.git various merges with the portable --- diff --git a/cmd/show/wwv.pl b/cmd/show/wwv.pl index 07a0259a..e0109726 100644 --- a/cmd/show/wwv.pl +++ b/cmd/show/wwv.pl @@ -28,7 +28,7 @@ while ($f = shift @f) { # next field $to = 10 if !$to; -push @out, "Date Hour SFI A K Forecast Logger"; +push @out, "Date Hour SFI K A Forecast Logger"; my @in = Geomag::search($from, $to, $main::systime); for (@in) { push @out, Geomag::print_item($_); diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 2feeda2d..1ffbe701 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -203,7 +203,14 @@ sub normal return; } - my $spot = Spot::add($freq, $field[2], $d, $text, $spotter, $field[7]); + my @spot = Spot::add($freq, $field[2], $d, $text, $spotter, $field[7]); + + # + # @spot at this point contains:- + # freq, spotted call, time, text, spotter, spotted cc, spotters cc, + # orig node, spotted itu, spotted cq, spotters itu, spotters cq + # you should be able to route on any of these + # # local processing my $r; @@ -214,9 +221,9 @@ sub normal return if $r; # send orf to the users - if ($spot && $pcno == 11) { + if (@spot && $pcno == 11) { my $buf = Spot::formatb($field[1], $field[2], $d, $text, $spotter); - broadcast_users("$buf\a\a", 'dx', $spot); + broadcast_users("$buf\a\a", 'dx', $spot[0]); } # DON'T be silly and send on PC26s! diff --git a/perl/Spot.pm b/perl/Spot.pm index 3bc643cb..c2917e2e 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -52,9 +52,15 @@ sub add # add the 'dxcc' country on the end for both spotted and spotter, then the cluster call my @dxcc = Prefix::extract($out[1]); - push @out, (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0; + my $spotted_dxcc = (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0; + my $spotted_itu = (@dxcc > 0 ) ? $dxcc[1]->itu() : 0; + my $spotted_cq = (@dxcc > 0 ) ? $dxcc[1]->cq() : 0; + push @out, $spotted_dxcc; @dxcc = Prefix::extract($out[4]); - push @out, (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0; + my $spotter_dxcc = (@dxcc > 0 ) ? $dxcc[1]->dxcc() : 0; + my $spotter_itu = (@dxcc > 0 ) ? $dxcc[1]->itu() : 0; + my $spotter_cq = (@dxcc > 0 ) ? $dxcc[1]->cq() : 0; + push @out, $spotter_dxcc; push @out, $spot[5]; my $buf = join("\^", @out); @@ -63,7 +69,7 @@ sub add # automagically closes the output file (if any)). $fp->writeunix($out[2], $buf); - return $buf; + return ($buf, $spotted_itu, $spotted_cq, $spotter_itu, $spotter_cq); } # search the spot database for records based on the field no and an expression