X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=f890a87a571bebc27513b15da1ea4d9b49188706;hb=be36cf03fda7db009f463d687dd98381139703f6;hp=7f9139cf8c9c0def2f5f4160cca7a202f0de9781;hpb=5851dcf9c9c37e30a01cbb4d94b3681e6e542b57;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 7f9139cf..f890a87a 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -361,7 +361,7 @@ sub dup $d = int ($d / 60); $d *= 60; - $by =~ s/-\d+$//g; + $by =~ s|[-/]\d+$||; $freq = sprintf "%.1f", $freq; # normalise frequency $call = substr($call, 0, $maxcalllth) if length $call > $maxcalllth; @@ -375,9 +375,9 @@ sub dup $text = "" if $cty == $try[0]; } } - $text = substr($text, 0, $duplth) if length $text > $duplth; $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;