X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=727ab07a3969e50a882c8fbbaac042778c1f5988;hb=e5a96ae00d9c44c94cff828e73cadc5352e531ef;hp=d52575afbcc8ce25a1870aff607e8da1356c1443;hpb=50c5cbb346de7d1b5026e8a205b5cf1e04e6cf05;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index d52575af..727ab07a 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -209,6 +209,9 @@ sub search my \@a = (Prefix::cty_data(\$s[1]))[1..3]; my \@b = (Prefix::cty_data(\$s[4]))[1..3]; push \@s, \@a[0,1], \@b[0,1], \$a[2], \$a[2]; + } else { + \$s[12] ||= ' '; + \$s[13] ||= ' '; } my (\$filter, \$hops) = \$dxchan->{spotsfilter}->it(\@s); next unless (\$filter); @@ -343,17 +346,23 @@ sub dup $text = "" if $cty == $try[0]; } } + my $otext = $text; $text = pack("C*", map {$_ & 127} unpack("C*", $text)); + $text =~ s/\s{2,}[\dA-Z]?[A-Z]\d?$// if length $text > 24; $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); -# my $sdupkey = "X$freq|$call|$by"; -# $t = DXDupe::find($sdupkey); -# return 1 if $t && $t - $main::systime > 0; -# DXDupe::add($sdupkey, $main::systime+$dupage); + $otext = substr($otext, 0, $duplth) if length $otext > $duplth; + $otext =~ s/\s+$//; + 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); + } return 0; }