X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FVE7CC.pm;h=58964c5a67304d5ccbd46c38b32a4717083f913c;hb=9e5520826fe61fd3ac6941f2b8bf736a432eaa15;hp=2679ff1e4e2f39dda68d71821c6e9a8faa9fb65b;hpb=d7c0e5450bfc963d1adb291611dd5b3664f9069d;p=spider.git diff --git a/perl/VE7CC.pm b/perl/VE7CC.pm index 2679ff1e..58964c5a 100644 --- a/perl/VE7CC.pm +++ b/perl/VE7CC.pm @@ -15,6 +15,7 @@ use DXDebug; use DXUtil; use Julian; use Prefix; +use DXUser; use strict; @@ -30,14 +31,30 @@ sub dx_spot my $freq = shift; my $spotted = shift; my $t = shift; + my $loc_spotted = ''; + my $loc_spotter = ''; + my $ref = DXUser->get_current($spotted); + if ($ref) { + my $loc = $ref->qra || ''; + $loc_spotted =substr($loc, 0, 4) if $loc; + } + + # remove any items above the top of the max spot data + pop while @_ > 11; - # remove interface callsign; - pop; + # make sure both US states are defined + $_[9] ||= ''; + $_[10] ||= ''; my $spotted_cc = (Prefix::cty_data($spotted))[5]; my $spotter_cc = (Prefix::cty_data($_[1]))[5]; + $ref = DXUser->get_current($_[1]); + if ($ref) { + my $loc = $ref->qra || ''; + $loc_spotter = substr($loc, 0, 4) if $loc; + } - return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_, $spotter_cc, $spotted_cc); + return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_, $spotted_cc, $spotter_cc, $loc_spotted, $loc_spotter); } 1;