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;
19 # first lets see if we think we have a callsign as the first argument
20 if ($f[0] =~ /[A-Za-z]/) {
24 $line =~ s/^$f[0]\s+$f[1]\s+$f[2]\s*//;
28 $line =~ s/^$f[0]\s+$f[1]\s*//;
31 # check the freq, if the number is < 1800 it is in Mhz (probably)
32 $freq = $freq * 1000 if $freq < 1800;
34 # 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;
52 # check we have a callsign :-)
53 if ($spotted le ' ') {
54 push @out, "Need a callsign for the spot [usage: DX freq call comments]" ;
58 return (1, @out) if !$valid;
61 if (Spot::add($freq, $spotted, $main::systime, $line, $spotter)) {
62 # send orf to the users
63 my $buf = Spot::formatb($freq, $spotted, $main::systime, $line, $spotter);
64 DXProt::broadcast_users($buf);
67 # send it orf to the cluster (hang onto your tin helmets)!
68 DXProt::broadcast_ak1a(DXProt::pc11($spotter, $freq, $spotted, $line));