4 # Copyright (c) 2001 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
17 my @pref = split /[\s,]+/, $line;
18 push @dxcc, Prefix::to_ciz('nc', @pref);
19 return (1, $self->msg('e27', $line)) unless @dxcc;
21 push @dxcc, (61..67) if $self->dxcc >= 61 && $self->dxcc < 67;
22 push @dxcc, $self->dxcc unless @dxcc;
25 my $now = Julian::Day->new(time())->sub(1);
29 # generate the spot list
30 for ($i = 0; $i < $days; $i++) {
31 my $fh = $Spot::statp->open($now); # get the next file
34 $fh = $Spot::statp->open($now);
39 next if $l[0] eq 'TOTALS';
40 next unless grep $l[2] eq $_, @dxcc;
41 my $ref = $list{$l[0]} || [0,0,0,0,0,0,0,0,0,0];
43 foreach my $item (@l[4..13]) {
48 $list{$l[0]} = $ref if $ref->[0];
57 push @out, $self->msg('stathft', join(',', @dxcc), cldate(time));
58 push @out, sprintf "%10s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s", qw(Callsign Tot 160m 80m 60m 40m 30m 20m 17m 15m 12m 10m);
60 for (sort {$list{$b}->[0] <=> $list{$a}->[0] || $a cmp $b} keys %list) {
63 my @list = (sprintf "%10s", $_);
64 foreach my $j (0..11) {
68 $r = sprintf("%4d", $r);
74 push @out, join('|', @list);
75 last if $limit && $nocalls >= $limit;
78 $nocalls = sprintf "%10s", "$nocalls calls";
79 @tot = map {$_ ? sprintf("%4d", $_) : ' ' } @tot;
80 push @out, join('|', $nocalls, @tot, "");