fix very long standing bug in storing and transmitting spots. The decimal
[spider.git] / cmd / dx.pl
index 75ba77dc866e8a0152d918a1ce514a9c6660186a..fd233eb1afc55dedf78f50d0ca5e529975288c99 100644 (file)
--- a/cmd/dx.pl
+++ b/cmd/dx.pl
@@ -93,8 +93,10 @@ if ($spotted le ' ') {
 
 return (1, @out) unless $valid;
 
-# change ^ into : for transmission
-$line =~ s/\^/:/og;
+my @bad;
+if (@bad = BadWords::check($line)) {
+       return (1, $self->msg('e17', @bad));
+}
 
 # Store it here (but only if it isn't baddx)
 if (grep $_ eq $spotted, @DXProt::baddx) {
@@ -102,8 +104,11 @@ if (grep $_ eq $spotted, @DXProt::baddx) {
        push @out, $buf;
 } else {
        return (1, $self->msg('dup')) if Spot::dup($freq, $spotted, (int ($main::systime/60)) * 60, $line);
-       my @spot = Spot::add($freq, $spotted, $main::systime, $line, $spotter, $main::mycall);
+       my @spot = Spot::prepare($freq, $spotted, $main::systime, $line, $spotter, $main::mycall);
        if (@spot) {
+               # store it 
+               Spot::add(@spot);
+
                # send orf to the users
                DXProt::send_dx_spot($self, DXProt::pc11($spotter, $freq, $spotted, $line), @spot);
        }