X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FVE7CC.pm;h=81a11144b8f3ed4b1fbd0e538c77da67d9207eaa;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=43390fb943341472735a0f599d20d73ab3f8aa60;hpb=080b937d5e6d083879e9df1dd70def745efd8839;p=spider.git diff --git a/perl/VE7CC.pm b/perl/VE7CC.pm index 43390fb9..81a11144 100644 --- a/perl/VE7CC.pm +++ b/perl/VE7CC.pm @@ -15,26 +15,40 @@ use DXDebug; use DXUtil; use Julian; use Prefix; +use DXUser; use strict; -use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; - sub dx_spot { my $self = shift; # this may be useful some day 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; + + # make sure both US states are defined + $_[9] ||= ''; + $_[10] ||= ''; - # remove interface callsign; - pop; + 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), @_); + return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_, $spotted_cc, $spotter_cc, $loc_spotted, $loc_spotter); } 1;