and again...
authorminima <minima>
Sun, 30 Jul 2000 13:24:53 +0000 (13:24 +0000)
committerminima <minima>
Sun, 30 Jul 2000 13:24:53 +0000 (13:24 +0000)
perl/DXCommandmode.pm
perl/DXProt.pm
perl/Messages

index ab82d904e9ba1eb5d1279f6303eaac4ae8869548..70ba4b9201b9fc278876fe860da702cdbbd33193 100644 (file)
@@ -196,8 +196,11 @@ sub normal
                        for (@{$self->{talklist}}) {
                                my $ent = $_;
                                my ($to, $via) = $ent =~ /(\S+)>(\S+)/;
-                               my $dxchan = DXChannel->get($via);
-                               if ($dxchan && DXCluster->get_exact($to)) {
+                               $to = $ent unless $to;
+                               my $call = $via ? $via : $to;
+                               my $clref = DXCluster->get_exact($call);
+                               my $dxchan = $clref->dxchan if $clref;
+                               if ($dxchan) {
                                        $dxchan->talk($self->{call}, $to, $via, $cmdline);
                                } else {
                                        $self->send($self->msg('disc2', $via ? $via : $to));
@@ -229,6 +232,7 @@ sub talk_prompt
        my @call;
        for (@{$self->{talklist}}) {
                my ($to, $via) = /(\S+)>(\S+)/;
+               $to = $_ unless $to;
                push @call, $to;
        }
        return $self->msg('talkprompt', join(',', @call));
index 65ad93f930a1bcb164ea623c1fe4f15be8ed19a1..90506ed4df9ee6c44ea80e115fe0abef9b6c38bc 100644 (file)
@@ -221,11 +221,15 @@ sub normal
                                return;
                        }
 
-                       # are any of the crucial fields invalid?
-            if ($field[2] =~ /(?:^\s*$|[a-z])/ || $field[6] =~ /(?:^\s*$|[a-z])/ || $field[7] =~ /(?:^\s*$|[a-z])/) {
+                       # are any of the callsign fields invalid?
+            if ($field[2] =~ m/[^A-Z0-9\-\/]/ || $field[6] =~ m/[^A-Z0-9\-]/ || $field[7] =~ m/[^A-Z0-9\-]/) {
                                dbg('chan', "Spot contains lower case callsigns or blanks, rejected");
                                return;
                        }
+            if ($field[1] =~ m/[^0-9\.]/) {
+                               dbg('chan', "Spot frequency not numeric, rejected");
+                               return;
+                       }
                        
                        # do some de-duping
                        $field[5] =~ s/^\s+//;      # take any leading blanks off
@@ -619,7 +623,7 @@ sub normal
                                my $ref = DXUser->get_current($field[2]);
                                my $cref = DXCluster->get($field[2]);
                                Log('rcmd', 'in', $ref->{priv}, $field[2], $field[3]);
-                               unless ($field[3] =~ /rcmd/i || !$cref || !$ref || $cref->mynode->call ne $ref->homenode) {    # not allowed to relay RCMDS!
+                               unless (!$cref || !$ref || $cref->mynode->call ne $ref->homenode) {    # not allowed to relay RCMDS!
                                        if ($ref->{priv}) {     # you have to have SOME privilege, the commands have further filtering
                                                $self->{remotecmd} = 1; # for the benefit of any command that needs to know
                                                my $oldpriv = $self->{priv};
index 7918a6e13917c24c411d6659fd09dfbdf6d8b35b..0f753716549b70f47a4775c78abc39e09e9697bc 100644 (file)
@@ -115,6 +115,7 @@ package DXM;
                                m14 => 'Message no $_[0] marked as sent to $_[1]',
                                m15 => 'Message no $_[0] unmarked as sent to $_[1]',
                                m16 => 'Need a Message number',
+                               m17 => 'Sorry, cannot send messages in $_[0] mode',
                 msg1 => 'Bulletin Messages Queued',
                 msg2 => 'Private Messages Queued',
                                msg3 => 'Msg $_[0]: $_[1] changed from $_[2] to $_[3]',