From: Dirk Koopman Date: Fri, 14 Jun 2024 20:02:48 +0000 (+0100) Subject: remove origin node from Spot Dupes as default X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=24fb0e58dd1f7bc62eb3924b81d37ea3763535f4;p=spider.git remove origin node from Spot Dupes as default --- diff --git a/Changes b/Changes index ca517916..dd8c6ba3 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,11 @@ +14Jun24====================================================================== +1. Add new flag $Spot::no_node_in_dupe (default: 1) which disables including + the origin node for spot dupes. This should stop people posting the same + spot simultaniously on several nodes at once. Or at least just ignore all + the "duplicates". + + The curious thing is that this (default) behaviour was the only deduping + done originally and there was some reason to include the origin node. 30Apr24====================================================================== 1. "Fix" PC92 and PC19 node user creation and modification such that non- connected nodes or nodes that DON'T have sysop altered privilege and diff --git a/perl/Spot.pm b/perl/Spot.pm index 316eb4b9..88f13a00 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -77,7 +77,7 @@ our $readback = $main::is_win ? 0 : 1; # don't read spot files backwards if it's our $qrggranularity = 1000; # normalise the qrg to this number of hz (default: 100khz), so tough luck if you have a fumble fingers moment our $timegranularity = 600; # ditto to the nearest 100 seconds our $oldstyle = 0; # revert to traditional dupe key format - +our $no_node_in_dupe = 1; # remove the node field from dupe considerations. if ($readback) { $readback = `which tac`; @@ -530,18 +530,24 @@ sub dup $l = length $text; $dtext .= qq{->final:'$text'($l)} if isdbg('spottext'); - - my $ldupkey = $oldstyle ? "X|$call|$by|$node|$freq|$d|$text" : "X|$call|$by|$node|$qrg|$nd|$text"; my $t = 0; - $t = DXDupe::find($ldupkey); - dbg("Spot::dup ldupkey $ldupkey t '$t'") if isdbg('spotdup'); - $dtext .= ' DUPE' if $t; - dbg("text transforms: $dtext") if length $text && isdbg('spottext'); - return 1 if $t > 0; - - DXDupe::add($ldupkey, $main::systime+$dupage) unless $just_find; + my $ldupkey; + # new feature: don't include the origin node in Spot dupes + # default = true + unless ($no_node_in_dupe) { + $ldupkey = $oldstyle ? "X|$call|$by|$node|$freq|$d|$text" : "X|$call|$by|$node|$qrg|$nd|$text"; + + $t = DXDupe::find($ldupkey); + dbg("Spot::dup ldupkey $ldupkey t '$t'") if isdbg('spotdup'); + $dtext .= ' DUPE' if $t; + dbg("text transforms: $dtext") if length $text && isdbg('spottext'); + return 1 if $t > 0; + + DXDupe::add($ldupkey, $main::systime+$dupage) unless $just_find; + } + $otext = substr($otext, 0, $duplth) if length $otext > $duplth; $otext =~ s/\s+$//; if (length $otext && $otext ne $text) {