add country names to the end of the Ve7cc dx spots string
[spider.git] / perl / VE7CC.pm
1 #
2 # VE7CC variations for DXCommandmode
3 #
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
6 # flight (as it were).
7 #
8 # This could change.
9 #
10
11 package VE7CC;
12
13 use DXVars;
14 use DXDebug;
15 use DXUtil;
16 use Julian;
17 use Prefix;
18
19 use strict;
20
21 use vars qw($VERSION $BRANCH);
22 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
23 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/  || (0,0));
24 $main::build += $VERSION;
25 $main::branch += $BRANCH;
26
27 sub dx_spot
28 {
29         my $self = shift;                       # this may be useful some day
30         my $freq = shift;
31         my $spotted = shift;
32         my $t = shift;
33         
34         # remove interface callsign;
35         pop;
36         
37         my $spotted_cc = (Prefix::cty_data($spotted))[5];
38         my $spotter_cc = (Prefix::cty_data($_[1]))[5];
39         
40         return sprintf("CC11^%0.1f^%s^", $freq, $spotted) . join('^', cldate($t), ztime($t), @_, $spotter_cc, $spotted_cc);
41 }
42
43 1;