]> gb7djk.dxcluster.net Git - spider.git/commitdiff
fix dupe detection in dx command
authorDirk Koopman <djk@tobit.co.uk>
Thu, 30 Jan 2025 11:48:27 +0000 (11:48 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 30 Jan 2025 11:48:27 +0000 (11:48 +0000)
cmd/dx.pl

index dde04a862b7abc3316d724f3aad8ca04752076cf..b8f2efad9b9ec5ecce124edb4231f5761d86625c 100644 (file)
--- a/cmd/dx.pl
+++ b/cmd/dx.pl
@@ -180,8 +180,13 @@ if ($freq =~ /^69/ || $localonly) {
                push @{$self->{sluggedpcs}}, [61, $spot, \@spot];
        } else {
                # store in spots database 
-               Spot::add(@spot);
-               DXProt::send_dx_spot($self, $spot, @spot);
+               unless (Spot::dup_find(@spot)) {
+                       Spot::dup_add(0, @spot);
+                       DXProt::send_dx_spot($self, $spot, @spot);
+               } else {
+                       push @out, "Duplicate spot: $line";
+                       LogDbg("DXCommand", "Spot dupe from $spotter: $line");
+               } 
        }
 }