fix sh/log things to allow all search strings
[spider.git] / cmd / show / log.pl
index 29d2b51232aca51f3bae521e98ce2ac42b18d1e5..b1023f29bea726cdf5182c58e0a4af6bf82f91ba 100644 (file)
@@ -27,7 +27,7 @@ sub handle
                        ($to) = $f =~ /^(\d+)$/o 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("show/log $cmdline", \&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]));
 }