add cmd line to forkcall stats
[spider.git] / cmd / show / talk.pl
1 #
2 # print out the general log file for talks only
3 #
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
5 #
6 #
7 #
8 my $self = shift;
9
10 my $cmdline = shift;
11 my @f = split /\s+/, $cmdline;
12 my $f;
13 my @out;
14 my ($from, $to, $who); 
15
16 $from = 0;
17 while ($f = shift @f) {                 # next field
18         #  print "f: $f list: ", join(',', @list), "\n";
19         if (!$from && !$to) {
20                 ($from, $to) = $f =~ /^(\d+)-(\d+)$/o;         # is it a from -> to count?
21                 next if $from && $to > $from;
22         }
23         if (!$to) {
24                 ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
25                 next if $to;
26         }
27         next if $who;
28         ($who) = $f =~ /^(\w+)/o;
29 }
30
31 $to = 20 unless $to;
32 $from = 0 unless $from;
33 if ($self->priv < 6) {
34         $who = $self->call unless $who;
35         return (1, $self->msg('e5')) if $who ne $self->call;
36 }
37
38 @out = $self->spawn_cmd("show/talk $cmdline", \&DXLog::print, args => [$from, $to, $main::systime, 'talk', $who]);
39         
40 #@out = DXLog::print($from, $to, $main::systime, 'talk', $who);
41 return (1, @out);