X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Ffilter.pl;fp=cmd%2Fshow%2Ffilter.pl;h=7289eed6f3b95a51cfc0bd266de18f0fd35a5636;hb=211b54d504170a8c9dad2bf25b9ed686d5eeac11;hp=0000000000000000000000000000000000000000;hpb=0ee845aaebeeb0f5a7232021d9c633a0ef2fff80;p=spider.git diff --git a/cmd/show/filter.pl b/cmd/show/filter.pl new file mode 100644 index 00000000..7289eed6 --- /dev/null +++ b/cmd/show/filter.pl @@ -0,0 +1,31 @@ +# +# show filter commands +# +# Copyright (c) 2000 Dirk Koopman G1TLH +# +# $Id$ +# +my ($self, $line) = @_; +my @f = split /\s+/, $line; +my @out; +my $dxchan = $self; +my $sort = ''; + +my $f = lc shift @f if @f; +if ($self->priv >= 8) { + my $d = DXChannel->get(uc $f); + $dxchan = $d if $d; + $f = lc shift @f if @f; +} + +$sort = $f if $f; +$sort .= 'filter'; + +my $key; +foreach $key (sort keys %$self) { + if ($key =~ /$sort$/) { + push @out, $self->{$key}->print if $self->{$key}; + } +} +push @out, $self->msg('filter3', $dxchan->call) unless @out; +return (1, @out);