Merge mojo build 413 DXProthandle + DXUtil
[spider.git] / perl / Spot.pm
index 9019bb5b92dbfb6f8a0f0729de336d769918f999..8c353b90e225fd28a8796162dbf972b0ccc4ef07 100644 (file)
@@ -50,6 +50,7 @@ $filterdef = bless ([
                          ['call_state', 'ns', 12],
                          ['by_state', 'ns', 13],
                          ['channel', 'c', 14],
+                         ['ip', 'c', 15],
                                         
                         ], 'Filter::Cmd');
 $totalspots = $hfspots = $vhfspots = 0;
@@ -222,7 +223,7 @@ sub add
 #   $f5 = spotted dxcc country
 #   $f6 = spotter dxcc country
 #   $f7 = origin
-#
+#   $f8 = ip address
 #
 # In addition you can specify a range of days, this means that it will start searching
 # from <n> days less than today to <m> days less than today
@@ -302,6 +303,7 @@ sub search
                                        }
                                }
                          );
+       
     
        dbg("Spot eval: $eval") if isdbg('searcheval');
        
@@ -405,7 +407,7 @@ sub dup
        if ($cty && $text && length $text <= 4) {
                unless ($text =~ /^C?Q/ || $text =~ /^[\d\W]+$/) {
                        my @try = Prefix::cty_data($text);
-                       $text = "" if $cty == $try[0];
+                       $text = "" if @try && $cty == $try[0];
                }
        }
        my $otext = $text;