fix RCMDs
authorminima <minima>
Sun, 19 Aug 2001 13:40:04 +0000 (13:40 +0000)
committerminima <minima>
Sun, 19 Aug 2001 13:40:04 +0000 (13:40 +0000)
Changes
perl/DXProt.pm
perl/ExtMsg.pm

diff --git a/Changes b/Changes
index f7826e105a7cf3f2de34804d2a9ed264f4a9424a..7d5907505fe2c304c662f6cc1d0209a6c8af8ce6 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+19Aug01=======================================================================
+1. Fix rcmds
 17Aug01=======================================================================
 1. Sort out PC41 handling to include type 5 records for QRA locators and also
 remove all filtering (but retain ephemeral dup checking).
index e41951da26b4f932be9b8103bb52e75e21adcfcd..88433b5726985a04dc17ed47163c270d272a125c 100644 (file)
@@ -1605,10 +1605,7 @@ sub process_rcmd_reply
                my $s = $rcmds{$fromnode};
                if ($s) {
                        my $dxchan = DXChannel->get($s->{call});
-                       my $ref = DXChannel->get($user) || $dxchan;
-                       if ($ref->{call} eq $main::mycall) {
-                               $ref = DXChannel->get($main::myalias) || $ref;
-                       }
+                       my $ref = $user eq $tonode ? $dxchan : (DXChannel->get($user) || $dxchan);
                        $ref->send($line) if $ref;
                        delete $rcmds{$fromnode} if !$dxchan;
                } else {
index 7b33b6e2780d43e19d663d63f0fe4bdf59a0b14f..2f12d4262f87e2f6c68759ce76c80dace71368bb 100644 (file)
@@ -200,8 +200,8 @@ sub _docmd
                                last;
                        }  
                }
-               if ($cmd =~ /^\s*\'.*\'\s+\'.*\'/i) {
-                       $conn->_dochat($cmd, $msg);
+               if ($cmd =~ /^\s*\'([^\']*)\'\s+\'([^\']*)\'/) {
+                       $conn->_dochat($cmd, $msg, $1, $2);
                        last;
                }
                if ($cmd =~ /^\s*cl\w+\s+(.*)/i) {
@@ -317,9 +317,10 @@ sub _dochat
        my $conn = shift;
        my $cmd = shift;
        my $line = shift;
+       my $expect = shift;
+       my $send = shift;
                
        if ($line) {
-               my ($expect, $send) = $cmd =~ /^\s*\'(.*)\'\s+\'(.*)\'/;
                if ($expect) {
                        dbg("connect $conn->{cnum}: expecting: \"$expect\" received: \"$line\"") if isdbg('connect');
                        if ($conn->{abort} && $line =~ /\Q$conn->{abort}/i) {