X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fclear%2Fspots.pl;h=d2a59bc07131195176775adb74fe693d045efe98;hb=33c95e70cc90be9f60c4efd73717386b299048f7;hp=28c2a4a4e02501d49d37a11396e49b9561ef00a2;hpb=bb8879b9edc81909ffc6880fd182f79b3bd23383;p=spider.git diff --git a/cmd/clear/spots.pl b/cmd/clear/spots.pl index 28c2a4a4..d2a59bc0 100644 --- a/cmd/clear/spots.pl +++ b/cmd/clear/spots.pl @@ -6,30 +6,29 @@ # $Id$ # my ($self, $line) = @_; -my @f = split /\s+/, $line; +my @f = split(/\s+/, $line); my @out; my $dxchan = $self; 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) { - if (is_callsign(uc $f)) { - my $uref = DXUser->get(uc $f); + if (is_callsign(uc $f[0])) { + $f = uc shift @f; + my $uref = DXUser->get($f); $call = $uref->call if $uref; } - if (@f) { - $f = lc shift @f; - if ($f eq 'input') { - $flag = 'in'; - $f = shift @f if @f; - } + if ($f[0] eq 'input') { + shift @f; + $flag = 'in'; } } -$fno = $f if $f; +$fno = shift @f if @f && $f[0] =~ /^\d$/; + my $filter = Filter::read_in($sort, $call, $flag); Filter::delete($sort, $call, $flag, $fno); $flag = $flag ? "input " : "";