stop dupe spots from the same user with same details ignoring comment
authorminima <minima>
Tue, 15 Oct 2002 14:06:43 +0000 (14:06 +0000)
committerminima <minima>
Tue, 15 Oct 2002 14:06:43 +0000 (14:06 +0000)
Changes
cmd/dx.pl
perl/DXProt.pm
perl/Spot.pm

diff --git a/Changes b/Changes
index 0f60b7dd56aa4bc987ecc88085ee77a75a9d41a1..d31e0c7e87f2499ba7fc4823799323a05325f5ba 100644 (file)
--- a/Changes
+++ b/Changes
@@ -19,9 +19,9 @@ is this:-
 6a. If you don't have Compress::Zlib loaded then you will need to gunzip
     it manually and do: create_usdb.pl /tmp/usdbraw (not Windows :-)
 7. on linux, in a console window do: load/usdb, on windows: restart the node. 
-
-Added set/usdb command to add adding or changing of a callsign in the USDB
-
+--
+2. Added set/usdb command to add adding or changing of a callsign in the USDB
+3. Stop dupe spots from the same spotter (with or without comment corruption)
 14Oct02=======================================================================
 1. added show/usdb command as a simple, direct interface to the information
 available in the USDB stuff.
index a7dc99ada65910c810fb45b8d31cb339de175067..eefbb8603380ad7e7c8978e64290598d6d290f02 100644 (file)
--- a/cmd/dx.pl
+++ b/cmd/dx.pl
@@ -103,7 +103,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);
+return (1, $self->msg('dup')) if Spot::dup($freq, $spotted, $t, $line, $spotter);
 my @spot = Spot::prepare($freq, $spotted, $t, $line, $spotter, $main::mycall);
 
 if ($DXProt::baddx->in($spotted) || $freq =~ /^69/ || $localonly) {
index 2bfb9e5e61fa7ac44a7ae669fd18b21f230c78ff..8437ff78ee313ae95816e49f0af0333b4f15c66f 100644 (file)
@@ -471,7 +471,7 @@ sub normal
                        # this goes after the input filtering, but before the add
                        # so that if it is input filtered, it isn't added to the dup
                        # list. This allows it to come in from a "legitimate" source
-                       if (Spot::dup($field[1], $field[2], $d, $field[5])) {
+                       if (Spot::dup($field[1], $field[2], $d, $field[5], $field[6])) {
                                dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr');
                                return;
                        }
index 982f8db5e19b51dadcfe088adea403b969b58b23..5c0ce792d673124343e9274b4460eae068969bae 100644 (file)
@@ -312,7 +312,7 @@ sub readfile($)
 # enter the spot for dup checking and return true if it is already a dup
 sub dup
 {
-       my ($freq, $call, $d, $text) = @_; 
+       my ($freq, $call, $d, $text, $by) = @_; 
 
        # dump if too old
        return 2 if $d < $main::systime - $dupage;
@@ -331,11 +331,14 @@ sub dup
        $text =~ s/[^a-zA-Z0-9]//g;
        for (-60, -120, -180, -240, 0, 60, 120, 180, 240, 300) {
                my $dt = $d - $_;
-               my $dupkey = "X$freq|$call|$dt|\L$text";
-               return 1 if DXDupe::find($dupkey);
+               my $ldupkey = "X$freq|$call|$dt|\L$text";
+               my $sdupkey = "X$freq|$call|$dt|$by";
+               return 1 if DXDupe::find($ldupkey) || DXDupe::find($sdupkey);
        }
-       my $dupkey = "X$freq|$call|$d|\L$text";
-       DXDupe::add($dupkey, $main::systime+$dupage);
+       my $ldupkey = "X$freq|$call|$d|\L$text";
+       my $sdupkey = "X$freq|$call|$d|$by";
+       DXDupe::add($ldupkey, $main::systime+$dupage);
+       DXDupe::add($sdupkey, $main::systime+$dupage);
        return 0;
 }