fix sh/log things to allow all search strings
[spider.git] / cmd / show / talk.pl
index f30d95ec57e9676e29f87cfdb772d242b70fe82e..6b3c4ea95a724957a2256a05ed7b70face4d1a27 100644 (file)
@@ -3,12 +3,10 @@
 #
 # Copyright (c) 1998 - Dirk Koopman G1TLH
 #
-# $Id$
+#
 #
 my $self = shift;
 
-return (1, $self->msg('e5')) if $self->priv < 9;
-
 my $cmdline = shift;
 my @f = split /\s+/, $cmdline;
 my $f;
@@ -27,11 +25,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;
+if ($self->priv < 6) {
+       $who = $self->call unless $who;
+       return (1, $self->msg('e5')) if $who ne $self->call;
+}
 
-@out = DXLog::print($from, $to, $main::systime, '^talk', $who);
-return (1, @out);
+return (1, DXLog::print($from, $to, $main::systime, 'talk', $who)) if $self->{_nospawn};
+return (1, $self->spawn_cmd("show/talk $cmdline", \&DXLog::print, args => [$from, $to, $main::systime, 'talk', $who]));