X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fchat.pl;h=6e209e25dbd5645cccc6bad700b372b2b3e77ac8;hb=62a87def961821679e455f333a58bc8c357e0457;hp=38d5b38ab8af5b813e0bb0bc37028e3f9c167f15;hpb=68fa2f8ae34d78464cb196851a7ce09ebef61b1b;p=spider.git diff --git a/cmd/show/chat.pl b/cmd/show/chat.pl index 38d5b38a..6e209e25 100644 --- a/cmd/show/chat.pl +++ b/cmd/show/chat.pl @@ -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("show/chat $cmdline", \&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);