fix search terms starting with \d+ in sh/log etc
[spider.git] / cmd / show / log.pl
index 18d9405091f8e6132640a74d4be5860003c56b4a..2abe825762e531a09dfa53f89529c5cc1037f360 100644 (file)
@@ -24,10 +24,10 @@ sub handle
                        next if $from && $to > $from;
                }
                unless ($to) {
-                       ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
+                       ($to) = $f =~ /^(\d+)$/ if !$to;              # is it a to count?
                        next if $to;
                }
-               unless ($who) {
+               unless ($f =~ /^\d+$/) {
                        $who = $f; 
                        next if $who;
                }
@@ -41,7 +41,6 @@ sub handle
                $who = $self->call;
        }
 
-       @out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, undef, $who]);
-       
-       return (1, @out);
+       return (1, DXLog::print($from, $to, $main::systime, undef, $who)) if $self->{_nospawn};
+       return (1, $self->spawn_cmd("show/log $cmdline", \&DXLog::print, args => [$from, $to, $main::systime, undef, $who]));
 }