From: Dirk Koopman Date: Thu, 19 Sep 2024 12:55:52 +0000 (+0100) Subject: reduce default spot dup granularity X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Ftest;hp=cc9c30938b63e913b096a64d2b737a6ffceffa88;p=spider.git reduce default spot dup granularity --- diff --git a/Changes b/Changes index ca517916..91319982 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,13 @@ +17Jun24====================================================================== +1. Reduce the default spot dupe qrg granularity to 25Khz. +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/DXProtHandle.pm b/perl/DXProtHandle.pm index dc27225d..ffe91741 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -2205,16 +2205,20 @@ sub handle_92 $user->build($parent->build($build)); ++$changed; } + if ($oldsort ne 'S') { $user->sort('S'); - unless (DXChannel::get($user->call)) { # only do this if not connected - my $oldpriv = $user->priv; - my $oldlock = $user->lockout; - $user->priv(1) unless defined $oldpriv && $oldpriv; - $user->lockout(1) unless defined $oldlock; - dbg(sprintf "PCPROT: PC92 K rec, node $call updated sort: $oldsort->S priv: '$oldpriv'->%d lockout: '$oldlock'->%s", $user->priv || 0, $user->lockout || 0); - ++$changed; - } + dbg(sprintf "PCPROT: PC92 K rec, node $call updated sort: $oldsort->S"); + ++$changed; + } + + unless (DXChannel::get($user->call)) { # only do this if not connected + my $oldpriv = $user->priv; + my $oldlock = $user->lockout; + my $lastchanged = $changed; + $user->priv(1), ++$changed unless defined $oldpriv && $oldpriv; + $user->lockout(1), ++$changed unless defined $oldlock; + dbg(sprintf "PCPROT: PC92 K rec, node $call updated priv: '$oldpriv'->%d lockout: '$oldlock'->%s", $user->priv || 0, $user->lockout || 0) if $lastchanged != $changed; } unless ($user->K) { dbg(sprintf "PCPROT: PC92 K rec, node $call updated - marked as sending PC92 K records priv: %d lockout: %d ", $user->priv || 0, $user->lockout || 0); diff --git a/perl/Spot.pm b/perl/Spot.pm index 316eb4b9..0b622a1c 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -74,10 +74,10 @@ our $spotcachedays = 2; # default 2 days worth our $minselfspotqrg = 1240000; # minimum freq above which self spotting is allowed our $readback = $main::is_win ? 0 : 1; # don't read spot files backwards if it's windows -our $qrggranularity = 1000; # normalise the qrg to this number of hz (default: 100khz), so tough luck if you have a fumble fingers moment +our $qrggranularity = 25; # normalise the qrg to this number of hz (default: 25khz), 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,24 +530,29 @@ 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; + my $ldupkey; + + # new feature: don't include the origin node in Spot dupes + # default = true + $node = '' if $no_node_in_dupe; + $ldupkey = $oldstyle ? "X|$call|$by|$freq|$node|$d|$text" : "X|$call|$by|$qrg|$node|$nd|$text"; + $t = DXDupe::find($ldupkey); - dbg("Spot::dup ldupkey $ldupkey t '$t'") if isdbg('spotdup'); + dbg("Spot::dup ldupkey $ldupkey t '$t'" . ($t?' DUPE':' NEW')) 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) { - $ldupkey = $oldstyle ? "X|$freq|$call|$by|$otext" : "X|$qrg|$call|$by|$otext"; + $ldupkey = $oldstyle ? "X|$call|$by|$freq|$otext" : "X|$call|$by|$qrg|$otext"; $t = DXDupe::find($ldupkey); - dbg("Spot::dup (OTEXT) ldupkey $ldupkey t '$t'") if isdbg('spotdup'); + dbg("Spot::dup (OTEXT) ldupkey $ldupkey t '$t'" . ($t?' DUPE':' NEW')) if isdbg('spotdup'); if (isdbg('spottext')) { $dtext .= sprintf q{ DUBIOUS '%s'}, join '', @dubious if @dubious; $dtext .= ' DUPE (OTEXT)' if $t;