4 # this is where the fun starts!
6 # Copyright (c) 1998 Dirk Koopman G1TLH
11 my ($self, $line) = @_;
12 my @f = split /\s+/, $line;
13 my $spotter = $self->call;
18 # first lets see if we think we have a callsign as the first argument
19 if ($f[0] =~ /[A-Za-z]/) {
23 $line =~ s/^$f[0]\s+$freq\s+$spotted\s*//;
27 $line =~ s/^$f[0]\s+$f[1]\s*//;
30 # check the freq, if the number is < 1800 it is in Mhz (probably)
31 $freq = $freq * 1000 if $freq < 1800;
33 # bash down the list of bands until a valid one is reached
40 foreach $bandref (Bands::get_all()) {
41 @bb = @{$bandref->band};
42 for ($i = 0; $i < @bb; $i += 2) {
43 if ($freq >= $bb[$i] && $freq <= $bb[$i+1]) {
50 push @out, "Frequency $freq not in band [usage: DX freq call comments]" if !$valid;
51 return (1, @out) if !$valid;
53 # send orf to the users
54 my $buf = sprintf "DX de %-7.7s %13.1f %-12.12s %-30.30s %5.5s\a\a", $spotter, $freq, $spotted, $line, ztime(time);
55 DXProt::broadcast_users($buf);
58 Spot::add($freq, $spotted, time, $line, $spotter);
60 # send it orf to the cluster (hang onto your tin helmets)!
61 DXProt::broadcast_ak1a(DXProt::pc11($spotter, $freq, $spotted, $line));