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