add sh/dx origin and ip and regexes
[spider.git] / perl / Spot.pm
index 7fcba6d1d045a005d0693306a72b0d3a2307b9f3..b7344702ddf1ce174b31db920fedfc225cb97fd1 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');
        
@@ -403,7 +405,7 @@ sub dup
        $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
        $text = uc unpad($text);
        if ($cty && $text && length $text <= 4) {
-               unless ($text =~ /^C?Q/ || $text =~ /^\d+$/) {
+               unless ($text =~ /^C?Q/ || $text =~ /^[\d\W]+$/) {
                        my @try = Prefix::cty_data($text);
                        $text = "" if $cty == $try[0];
                }