try to make sure that local nodes take precedence over external ones
[spider.git] / perl / DXProtHandle.pm
index a42ba33e871de8496d1f138414140ca37470d479..5e3f0597d9405d2279ad1d7fab742a3da36b39ff 100644 (file)
@@ -1560,12 +1560,14 @@ sub handle_92
                                                dbg("PCPROT: $call looped back onto $main::mycall, ignored") if isdbg('chanerr');
                                                return;
                                        }
+                                       # this is only accepted from my "self".
+                                       # this also kills configs from PC92 nodes with external PC19 nodes that are also
+                                       # locally connected. Local nodes always take precedence.
+                                       if (DXChannel::get($call) && $call ne $self->{call}) {
+                                               dbg("PCPROT: locally connected node $call from other another node $self->{call}, ignored") if isdbg('chanerr');
+                                               return;
+                                       }
                                        if ($is_extnode) {
-                                               # this is only accepted from my "self"
-                                               if (DXChannel::get($call) && $call ne $self->{call}) {
-                                                       dbg("PCPROT: locally connected node config for $call from other another node $self->{call}, ignored") if isdbg('chanerr');
-                                                       return;
-                                               }
                                                # reparent to external node (note that we must have received a 'C' or 'A' record
                                                # from the true parent node for this external before we get one for the this node
                                                unless ($parent = Route::Node::get($call)) {
@@ -1764,7 +1766,7 @@ sub handle_93
                my $wx = uc $to eq 'WX' ? '1' : '0';
                my $local = $via eq 'LOCAL' ? '*' : $via;
 
-               $self->send_announce(1, pc12($from, $text, $local, $via, $sysop, $wx, $pcall), $from, $local, $text, $sysop, $pcall, $wx, $via eq 'LOCAL' ? $via : undef);
+               $self->send_announce(1, pc12($from, $text, $local, $sysop, $wx, $pcall), $from, $local, $text, $sysop, $pcall, $wx, $via eq 'LOCAL' ? $via : undef);
                return if $via eq 'LOCAL';
        } else {
                # chat messages to non-pc9x nodes