X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FSpot.pm;h=8972447b7f1116612c6de228d635e879ec124b2f;hb=3299fa494b66b621ad4f1b78c25a129fe8cbadc7;hp=a57edbe81659a1b1b63bb269e93bf7e99e94f3b2;hpb=79d9dda3ba0b241596b2ac1daab2c780943c3628;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index a57edbe8..8972447b 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -328,6 +328,9 @@ sub dup $d = int ($d / 60); $d *= 60; + # remove SSID or area + $by =~ s|[-/]\d+$||; + $freq = sprintf "%.1f", $freq; # normalise frequency $call = substr($call, 0, $maxcalllth) if length $call > $maxcalllth; @@ -340,13 +343,21 @@ sub dup $text = "" if $cty == $try[0]; } } - $text = substr($text, 0, $duplth) if length $text > $duplth; + 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) { + $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;