X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=95b7e902d8db2cf6f8f3aa9d5f455eed803674ea;hb=f7b7f9f75c1d54acfe318793e3a60f77cb00e8bb;hp=d14e310eefdff0ef3a35dc1d0cd988902b98d5dd;hpb=8c2ef519e111e9a36f917828dac0fe1e2caae3f4;p=spider.git 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; }