]> scm.dxcluster.org Git - spider.git/commitdiff
fix borked dx command
authorDirk Koopman <djk@tobit.co.uk>
Thu, 30 Jan 2025 11:23:25 +0000 (11:23 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 30 Jan 2025 11:23:25 +0000 (11:23 +0000)
Changes
cmd/dx.pl
perl/DXCommandmode.pm
perl/Spot.pm

diff --git a/Changes b/Changes
index 3c52892dce9bddb7f5c8cdbd24fa3c1f5a5357be..e457e50b08e6a68826473ede99f8b0d6198dcb17 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+29Jan25======================================================================
+1. Fix dx command <cough>. "I never changed that bit". If I had this would
+   never have happened. 
 28Jan25======================================================================
 1. Set default Spot qrg granularity to 1KHz (was 25KHz).
 2. Refine Incoming CCLuster connection handling. It is a requirement that a
index a6475347569bae6ce7084ada8aa4b6c3a09a9df7..dde04a862b7abc3316d724f3aad8ca04752076cf 100644 (file)
--- a/cmd/dx.pl
+++ b/cmd/dx.pl
@@ -155,7 +155,7 @@ return (1, @out) unless $valid;
 
 # Store it here (but only if it isn't baddx)
 my $t = (int ($main::systime/60)) * 60;
-return (1, $self->msg('dup')) if Spot::dup($freq, $spotted, $t, $line, $spotter, $main::mycall);
+return (1, $self->msg('dup')) if Spot::dup_find($freq, $spotted, $t, $line, $spotter, $main::mycall);
 my @spot = Spot::prepare($freq, $spotted, $t, $line, $spotter, $main::mycall, $ipaddr);
 
 #$DB::single = 1;
index bc362456f568d28f85f598ad0283aa8994b1a2e1..d5cb1607d47cd07a520f624539410ec12b86c2e1 100644 (file)
@@ -620,8 +620,12 @@ sub process
                if ($dxchan->{isslugged} && $main::systime > $dxchan->{isslugged}) {
                        foreach my $ref (@{$dxchan->{sluggedpcs}}) {
                                if ($ref->[0] == 61) {
-                                       Spot::add(@{$ref->[2]});
-                                       DXProt::send_dx_spot($dxchan, $ref->[1], @{$ref->[2]});
+                                       unless (Spot::dup_find(@{$ref->[2]})) {
+                                               Spot::dup_add(@{$ref->[2]});
+                                               DXProt::send_dx_spot($dxchan, $ref->[1], @{$ref->[2]});
+                                       } else {
+                                               dbg("DXCommand: process slugged spot $ref->[1] is a dupe, ignored" );
+                                       }
                                }
                        }
 
index d84404b5cdc51b4e814f8b688320c0d7072fdbd2..b01bafb0fc576648b98b89de24ceaa32787c5316 100644 (file)
@@ -495,8 +495,8 @@ sub dup_add
        # remove SSID or area
        $by =~ s|[-/]\d+$||;
        
-#      $freq = sprintf "%.1f", $freq;       # normalise frequency
-       $freq = int $freq;       # normalise frequency
+       $freq = sprintf "%.1f", $freq;       # normalise frequency
+#      $freq = int $freq;       # normalise frequency
 
        my $qrg = nearest($qrggranularity, $freq); # to the nearest however many hz