and again
authorminima <minima>
Sun, 5 Nov 2000 12:41:51 +0000 (12:41 +0000)
committerminima <minima>
Sun, 5 Nov 2000 12:41:51 +0000 (12:41 +0000)
cmd/clear/spots.pl
perl/DXCommandmode.pm
perl/Spot.pm

index 28c2a4a4e02501d49d37a11396e49b9561ef00a2..d2a59bc07131195176775adb74fe693d045efe98 100644 (file)
@@ -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 " : "";
index 72d65cb316ebd05d0d36d76fd7330bcfd7a28d50..4477ea75241f62b97a57167f30bf23dc470459c7 100644 (file)
@@ -302,7 +302,7 @@ sub run_cmd
                
                # 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) {
                        
@@ -314,7 +314,7 @@ sub run_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");
                        }
                        
index 74e4e27a753ed2f640630f922036729575011537..67d8a6580aae023dfc6664c3985babfad0c7f9e5 100644 (file)
@@ -30,6 +30,7 @@ $dupage = 3*3600;               # the length of time to hold spot dups
 $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],