4 # Copyright (c) 2001 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
28 if ($f =~ /^\d+$/ && $f < 366) { # no of days
32 if (my $utime = Date::Parse::str2time($f)) { # is it a parseable date?
34 $now = Julian::Day->new($utime);
35 $date = cldate($utime);
39 if (is_callsign($f)) {
48 if (my @ciz = Prefix::to_ciz('nc', $f)) {
49 push @dxcc, map {[$_, 2]} @ciz;
52 push @out, $self->msg('e27', $f);
57 # return error messages if any
58 return (1, @out) if @out;
61 unless (@pref) { # no prefix or callsign, use default prefix
62 push @dxcc, [$_, 2] for @main::my_cc;
63 push @pref, $main::mycall;
68 $now = Julian::Day->new(time); #no starting date
72 # generate the spot list
73 for ($i = 0; $i < $days; $i++) {
74 my $fh = $Spot::statp->open($now); # get the next file
77 $fh = $Spot::statp->open($now);
82 next if $l[0] eq 'TOTALS';
83 next unless $all || grep $l[$_->[1]] eq $_->[0], @dxcc;
84 my $ref = $list{$l[0]} || [0,0,0,0,0,0,0,0,0,0];
86 foreach my $item (@l[14..16, 18..23]) {
91 $list{$l[0]} = $ref if $ref->[0];
99 my $l = join ',', @pref;
100 push @out, $self->msg('statvhft', $l, $date, $days);
101 #push @out, $self->msg('statvhft', join(',', @dxcc), cldate(time));
102 push @out, sprintf "%10s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|", qw(Callsign Tot 6m 4m 2m 70cm 23cm 13cm 9cm 6cm 3cm);
104 for (sort {$list{$b}->[0] <=> $list{$a}->[0] || $a cmp $b} keys %list) {
107 my @list = (sprintf "%10s", $_);
108 foreach my $j (0..9) {
112 $r = sprintf("%4d", $r);
118 push @out, join('|', @list, "");
119 last if $limit && $nocalls >= $limit;
122 $nocalls = sprintf "%10s", "$nocalls calls";
123 @tot = map {$_ ? sprintf("%4d", $_) : ' ' } @tot;
124 push @out, join('|', $nocalls, @tot, "");