# $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 " : "";
# split the command line up into parts, the first part is the command
my ($cmd, $args) = split /\s+/, $cmdline, 2;
- $args = "" unless $args;
+ $args = "" unless defined $args;
if ($cmd) {
my $acmd = CmdAlias::get_cmd($cmd);
if ($acmd) {
($cmd, $args) = split /\s+/, "$acmd $args", 2;
- $args = "" unless $args;
+ $args = "" unless defined $args;
dbg('command', "aliased cmd: $cmd $args");
}
$filterdef = bless ([
# tag, sort, field, priv, special parser
['freq', 'r', 0, 0, \&decodefreq],
+ ['on', 'r', 0, 0, \&decodefreq],
['call', 'c', 1],
['info', 't', 3],
['by', 'c', 4],