fix spot filtering where we are looking for US states but there ain't any.
[spider.git] / perl / Spot.pm
index f331d105b540ae1cd2e4b414c631ffcfbf97eca4..d14e310eefdff0ef3a35dc1d0cd988902b98d5dd 100644 (file)
@@ -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);
@@ -352,10 +355,12 @@ sub dup
        return 1 if $t && $t - $main::systime > 0;
        DXDupe::add($ldupkey, $main::systime+$dupage);
        $otext = substr($otext, 0, $duplth) if length $otext > $duplth; 
-       $ldupkey = "X$freq|$call|$by|$otext";
-       $t = DXDupe::find($ldupkey);
-       return 1 if $t && $t - $main::systime > 0;
-       DXDupe::add($ldupkey, $main::systime+$dupage);
+       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;