X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fchat.pl;h=f4ae651f8d21ffc28731abf10aa4a0cff8978b06;hb=8e14149148baba63ce5ae2b95aacda8ab6dd0d87;hp=38d5b38ab8af5b813e0bb0bc37028e3f9c167f15;hpb=201dedf3e4325faab5c34b38135790012142286b;p=spider.git diff --git a/cmd/show/chat.pl b/cmd/show/chat.pl index 38d5b38a..f4ae651f 100644 --- a/cmd/show/chat.pl +++ b/cmd/show/chat.pl @@ -1,7 +1,7 @@ # # print out the general log file for chat only # -# Copyright (c) 1998-2003 - Dirk Koopman G1TLH +# Copyright (c) 1998-2023 - Dirk Koopman G1TLH # # # @@ -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} || $main::is_win == 1) { + @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);