fix sh/log things to allow all search strings
[spider.git] / cmd / show / chat.pl
index 5ac6312e2714218e9af1f0f40e5abbd4df356467..6e209e25dbd5645cccc6bad700b372b2b3e77ac8 100644 (file)
@@ -28,13 +28,18 @@ while ($f = shift @f) {                 # next field
                next if $to;
        }
        next if $who;
-       ($who) = $f =~ /^(\w+)/o;
+       if ($f !~ /^\d+/) {
+               ($who) = $f;
+       }
+#      ($who) = $f =~ /^(\w+)/o;
 }
 
 $to = 20 unless $to;
 $from = 0 unless $from;
 
-@out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, 'chat', $who]);
-       
-#@out = DXLog::print($from, $to, $main::systime, 'chat', $who);
+if ($self->{_nospawn}) {
+       @out = DXLog::print($from, $to, $main::systime, 'chat', $who);
+} else {
+       @out = $self->spawn_cmd("show/chat $cmdline", \&DXLog::print, args => [$from, $to, $main::systime, 'chat', $who]);
+}
 return (1, @out);