Improve M$ Windows compatibility
[spider.git] / cmd / show / chat.pl
index cc251c10727f1e0e71f407e9142b977e285d2e4a..f4ae651f8d21ffc28731abf10aa4a0cff8978b06 100644 (file)
@@ -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,16 @@ while ($f = shift @f) {                 # next field
                next if $to;
        }
        next if $who;
+       if ($f !~ /^\d+$/) {
+               ($who) = $f;
+       }
 #      ($who) = $f =~ /^(\w+)/o;
 }
 
 $to = 20 unless $to;
 $from = 0 unless $from;
 
-if ($self->{_nospawn}) {
+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]);