X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=420025e6ed8f0d1445f5fd8ec5cfc85e1ce9a275;hb=47597a3f8635c4d4de89419c0c808ddcda59b9d5;hp=78d2eda566c7536a0127ecb3a4f4eb2ae14f8e31;hpb=2b58ccdf81685a1167a43c38705a0d84b9d8d661;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 78d2eda5..420025e6 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -311,12 +311,19 @@ sub dup $freq = sprintf "%.1f", $freq; # normalise frequency chomp $text; + $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = substr($text, 0, $duplth) if length $text > $duplth; unpad($text); - $text =~ s/[\\\%]\d+//g; + $text = pack("C*", map {$_ & 127} unpack("C*", $text)); $text =~ s/[^a-zA-Z0-9]//g; + for (0,60,120,180,240,300) { + my $dt = $d - $_; + my $dupkey = "X$freq|$call|$dt|\L$text"; + return 1 if DXDupe::find($dupkey); + } my $dupkey = "X$freq|$call|$d|\L$text"; - return DXDupe::check($dupkey, $main::systime+$dupage); + DXDupe::add($dupkey, $main::systime+$dupage); + return 0; } sub listdups