X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=f890a87a571bebc27513b15da1ea4d9b49188706;hb=9c9e4ae46b36d4e85bf8b969647079140667502b;hp=8f20a99952e8d28b47ce8179d9af32e9f42a968b;hpb=6eb08c1c1d0ba36ac588053a40d6367f1b069ba1;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 8f20a999..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; @@ -370,14 +370,14 @@ sub dup $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = uc unpad($text); if ($cty && $text && length $text <= 4) { - unless ($text =~ /^CQ/ || $text =~ /^\d+$/) { + unless ($text =~ /^C?Q/ || $text =~ /^\d+$/) { my @try = Prefix::cty_data($text); $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;