added all the spots filter commands - you luckey people
[spider.git] / cmd / show / filter.pl
1 #
2 # show filter commands
3 #
4 # Copyright (c) 2000 Dirk Koopman G1TLH
5 #
6 # $Id$
7 #
8 my ($self, $line) = @_;
9 my @f = split /\s+/, $line;
10 my @out;
11 my $dxchan = $self;
12 my $sort = '';
13
14 my $f = lc shift @f if @f;
15 if ($self->priv >= 8) {
16         my $d = DXChannel->get(uc $f);
17         $dxchan = $d if $d;
18         $f = lc shift @f if @f;
19 }
20
21 $sort = $f if $f;
22 $sort .= 'filter';
23
24 my $key;
25 foreach $key (sort keys %$self) {
26         if ($key =~ /$sort$/) {
27                 push @out, $self->{$key}->print if $self->{$key};
28         }
29 }
30 push @out, $self->msg('filter3', $dxchan->call) unless @out;
31 return (1, @out);