From f7b7f9f75c1d54acfe318793e3a60f77cb00e8bb Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 7 Nov 2005 22:03:38 +0000 Subject: [PATCH] fix dupes caused by AR-C adding prefix as last characters in the comment. --- Changes | 2 ++ perl/Spot.pm | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index 78bc3c51..d00de1e6 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ 07Nov05======================================================================= 1. Fix warnings on filtering spots where the filter was looking at US states and there is no US state in the spot. +2. Fix the dupes caused by having a prefix in the last characters of the +comment. 01Nov05======================================================================= 1. add log2csv.pl for printing out logfiles 25Oct05======================================================================= diff --git a/perl/Spot.pm b/perl/Spot.pm index d14e310e..95b7e902 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -346,25 +346,21 @@ sub dup $text = "" if $cty == $try[0]; } } + $text = substr($text, 0, $duplth) if length $text > $duplth; + $text =~ s/\s+$//; my $otext = $text; $text = pack("C*", map {$_ & 127} unpack("C*", $text)); $text =~ s/[^\w]//g; - $text = substr($text, 0, $duplth) if length $text > $duplth; my $ldupkey = "X$freq|$call|$by|$text"; my $t = DXDupe::find($ldupkey); return 1 if $t && $t - $main::systime > 0; DXDupe::add($ldupkey, $main::systime+$dupage); - $otext = substr($otext, 0, $duplth) if length $otext > $duplth; - if ( length $otext && $otext ne $text) { + if (length $otext && $otext ne $text) { $ldupkey = "X$freq|$call|$by|$otext"; $t = DXDupe::find($ldupkey); return 1 if $t && $t - $main::systime > 0; DXDupe::add($ldupkey, $main::systime+$dupage); } -# my $sdupkey = "X$freq|$call|$by"; -# $t = DXDupe::find($sdupkey); -# return 1 if $t && $t - $main::systime > 0; -# DXDupe::add($sdupkey, $main::systime+$dupage); return 0; } -- 2.43.0