X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fclear%2Fspots.pl;h=a7aa20af36bacfe054b3b66a17dfd7c66e8b637c;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=bdce5c86fc89e5604cf2385b098bb73d067325d6;hpb=211b54d504170a8c9dad2bf25b9ed686d5eeac11;p=spider.git diff --git a/cmd/clear/spots.pl b/cmd/clear/spots.pl index bdce5c86..a7aa20af 100644 --- a/cmd/clear/spots.pl +++ b/cmd/clear/spots.pl @@ -3,7 +3,7 @@ # # Copyright (c) 2000 Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; my @f = split /\s+/, $line; @@ -13,21 +13,24 @@ my $sort = 'spots'; my $flag; my $fno = 1; my $call = $dxchan->call; +my $f; -my $f = lc shift @f if @f; if ($self->priv >= 8) { - my $uref = DXUser->get(uc $f); - $call = $uref->call if $uref; - $f = undef; - $f = lc shift @f if @f; - if ($f && $f eq 'input') { + if (@f && is_callsign(uc $f[0])) { + $f = uc shift @f; + my $uref = DXUser::get($f); + $call = $uref->call if $uref; + } elsif (@f && lc $f[0] eq 'node_default' || lc $f[0] eq 'user_default') { + $call = lc shift @f; + } + if (@f && $f[0] eq 'input') { + shift @f; $flag = 'in'; - $f = undef; - $f = lc shift @f if @f; } } -$fno = $f if $f; +$fno = shift @f if @f && $f[0] =~ /^\d|all$/; + my $filter = Filter::read_in($sort, $call, $flag); Filter::delete($sort, $call, $flag, $fno); $flag = $flag ? "input " : "";