added all the spots filter commands - you luckey people
[spider.git] / cmd / clear / spots.pl
1 #
2 # clear filters 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 = 'spots';
13 my $flag;
14 my $fno = 1;
15 my $call = $dxchan->call;
16
17 my $f = lc shift @f if @f;
18 if ($self->priv >= 8) {
19         my $uref = DXUser->get(uc $f);
20         $call = $uref->call if $uref;
21         $f = undef;
22         $f = lc shift @f if @f;
23         if ($f && $f eq 'input') {
24                 $flag = 'in';
25                 $f = undef;
26                 $f = lc shift @f if @f;
27         }
28 }
29
30 $fno = $f if $f;
31 my $filter = Filter::read_in($sort, $call, $flag);
32 Filter::delete($sort, $call, $flag, $fno);
33 $flag = $flag ? "input " : "";
34 push @out, $self->msg('filter4', $flag, $sort, $fno, $call);
35 return (1, @out);