2 # VE7CC variations for DXCommandmode
4 # This is done this way because a) there aren't very many and
5 # b) because it isn't easy to reliably rebless the object in
22 use vars qw($VERSION $BRANCH);
23 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
24 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
25 $main::build += $VERSION;
26 $main::branch += $BRANCH;
30 my $self = shift; # this may be useful some day
31 my $spot = ref $_[0] ? shift : \@_;
32 my $freq = $spot->[0];
33 my $spotted = $spot->[1];
37 my $ref = DXUser->get_current($spotted);
39 my $loc = $ref->qra || '';
40 $loc_spotted =substr($loc, 0, 4) if $loc;
43 # remove any items above the top of the max spot data
46 # make sure both US states are defined
50 my $spotted_cc = (Prefix::cty_data($spotted))[5];
51 my $spotter_cc = (Prefix::cty_data($_[4]))[5];
52 $ref = DXUser->get_current($_[4]);
54 my $loc = $ref->qra || '';
55 $loc_spotter = substr($loc, 0, 4) if $loc;
58 return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @$spot[3..-1], $spotted_cc, $spotter_cc, $loc_spotted, $loc_spotter);