X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=d04ece059ce608b3f2de562f2d2dd7e72cf2cf6d;hb=9fa9d75454811315e6ec6dd5762cb6b728a0ae3a;hp=3012c9e968f4c36b958763b78baa15e6d511b4d5;hpb=37a9324302cb4de2c25ce0005d697fd9895ea8cd;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 3012c9e9..d04ece05 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,10 +530,15 @@ 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|$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; @@ -541,7 +546,7 @@ sub dup 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) { @@ -549,7 +554,7 @@ sub dup $t = DXDupe::find($ldupkey); dbg("Spot::dup (OTEXT) ldupkey $ldupkey t '$t'") if isdbg('spotdup'); if (isdbg('spottext')) { - $dtext .= sprintf q{DUBIOUS '%s'}, join '', @dubious if @dubious; + $dtext .= sprintf q{ DUBIOUS '%s'}, join '', @dubious if @dubious; $dtext .= ' DUPE (OTEXT)' if $t; dbg("text transforms: $dtext") if length $text; }