From 9fa9d75454811315e6ec6dd5762cb6b728a0ae3a Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Fri, 14 Jun 2024 22:08:23 +0100 Subject: [PATCH] fix no_node_in_dupe --- perl/Spot.pm | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/perl/Spot.pm b/perl/Spot.pm index 88f13a00..d04ece05 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -536,17 +536,16 @@ sub dup # 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; - } + $node = '' if $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+$//; -- 2.43.0