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;
+ }
}
}
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;
# get rid
if ($filter->{hops} || $filter->getfilkeys) {
$filter->install;
+ $filter->write;
} else {
$filter->install(1);
unlink $fn;
package Filter::Cmd;
use strict;
+use DXVars;
+use DXUtil;
+use DXDebug;
use vars qw(@ISA);
@ISA = qw(Filter);
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;
package Filter::Old;
use strict;
+use DXVars;
+use DXUtil;
+use DXDebug;
use vars qw(@ISA);
@ISA = qw(Filter);