From bb8879b9edc81909ffc6880fd182f79b3bd23383 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 1 Nov 2000 23:03:00 +0000 Subject: [PATCH] fixed some problems with clearing and things --- cmd/clear/spots.pl | 18 ++++++++++-------- cmd/show/filter.pl | 2 +- perl/Filter.pm | 13 ++++++++++--- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/cmd/clear/spots.pl b/cmd/clear/spots.pl index bdce5c86..28c2a4a4 100644 --- a/cmd/clear/spots.pl +++ b/cmd/clear/spots.pl @@ -16,14 +16,16 @@ my $call = $dxchan->call; 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') { - $flag = 'in'; - $f = undef; - $f = lc shift @f if @f; + if (is_callsign(uc $f)) { + my $uref = DXUser->get(uc $f); + $call = $uref->call if $uref; + } + if (@f) { + $f = lc shift @f; + if ($f eq 'input') { + $flag = 'in'; + $f = shift @f if @f; + } } } diff --git a/cmd/show/filter.pl b/cmd/show/filter.pl index 7289eed6..3b01712a 100644 --- a/cmd/show/filter.pl +++ b/cmd/show/filter.pl @@ -15,7 +15,7 @@ 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; + $f = lc shift @f; } $sort = $f if $f; diff --git a/perl/Filter.pm b/perl/Filter.pm index 6a0dad7a..37d9de6c 100644 --- a/perl/Filter.pm +++ b/perl/Filter.pm @@ -247,10 +247,10 @@ sub print foreach $key (sort $self->getfilkeys) { my $filter = $self->{$key}; if ($filter->{reject} && exists $filter->{reject}->{user}) { - push @out, ' ' . join(' ', $key, 'reject', $filter->{reject}->{user}); + push @out, ' ' . join(' ', $key, 'reject', $filter->{reject}->{user}); } if ($filter->{accept} && exists $filter->{accept}->{user}) { - push @out, ' ' . join(' ', $key, 'accept', $filter->{accept}->{user}); + push @out, ' ' . join(' ', $key, 'accept', $filter->{accept}->{user}); } } return @out; @@ -293,6 +293,7 @@ sub delete # get rid if ($filter->{hops} || $filter->getfilkeys) { $filter->install; + $filter->write; } else { $filter->install(1); unlink $fn; @@ -303,6 +304,9 @@ sub delete package Filter::Cmd; use strict; +use DXVars; +use DXUtil; +use DXDebug; use vars qw(@ISA); @ISA = qw(Filter); @@ -331,7 +335,7 @@ sub parse while (@f) { if ($ntoken == 0) { - if (@f && $dxchan->priv >= 8 && (DXUser->get($f[0]) || $f[0] =~ /(?:node|user)_default/)) { + if (@f && $dxchan->priv >= 8 && ((is_callsign(uc $f[0]) && DXUser->get(uc $f[0])) || $f[0] =~ /(?:node|user)_default/)) { $call = shift @f; if ($f[0] eq 'input') { shift @f; @@ -466,6 +470,9 @@ sub parse package Filter::Old; use strict; +use DXVars; +use DXUtil; +use DXDebug; use vars qw(@ISA); @ISA = qw(Filter); -- 2.43.0