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 # bash down the list of bands until a valid one is reached
38 foreach $bandref (Bands::get_all()) {
39 @bb = @{$bandref->band};
40 for ($i = 0; $i < @bb; $i += 2) {
41 if ($freq >= $bb[$i] && $freq <= $bb[$i+1]) {
51 $freq = $freq * 1000 if $freq;
54 foreach $bandref (Bands::get_all()) {
55 @bb = @{$bandref->band};
56 for ($i = 0; $i < @bb; $i += 2) {
57 if ($freq >= $bb[$i] && $freq <= $bb[$i+1]) {
67 push @out, $self->msg('dx1', $freq) if !$valid;
69 # check we have a callsign :-)
70 if ($spotted le ' ') {
71 push @out, $self->msg('dx2');
76 return (1, @out) if !$valid;
79 if (Spot::add($freq, $spotted, $main::systime, $line, $spotter)) {
80 # send orf to the users
81 my $buf = Spot::formatb($freq, $spotted, $main::systime, $line, $spotter);
82 DXProt::broadcast_users($buf);
85 # send it orf to the cluster (hang onto your tin helmets)!
86 DXProt::broadcast_ak1a(DXProt::pc11($spotter, $freq, $spotted, $line));