1. remove %nn strings from dups of announces and spots
[spider.git] / perl / DXProt.pm
index ffb9cf5bae3eaa396635b05dcc7843bc22e6790b..2df6b03ac511c4b333021bea6f3ed322174ec4e1 100644 (file)
@@ -504,8 +504,12 @@ sub normal
 #                              broadcast_ak1a(pc19($dxchan, $node), $dxchan, $self) unless $dxchan->{isolate};
                                
                        }
-                       if ($field[2] eq $main::mycall || $field[2] eq $main::myalias || $field[1] eq $main::myalias || $field[1] eq $main::mycall) {
-                               dbg('chan', "LOOP: trying to connect myself!");
+                       if ($field[1] eq $main::mycall || $field[2] eq $main::mycall) {
+                               dbg('chan', "LOOP: trying to alter config on this node from outside!");
+                               return;
+                       }
+                       if ($field[2] eq $main::myalias && DXChannel->get($field[1])) {
+                               dbg('chan', "LOOP: trying to connect sysop from outside!");
                                return;
                        }
                        unless ($node) {
@@ -535,7 +539,7 @@ sub normal
                                                dbg('chan', "LOOP: $call is a node");
                                                next;
                                        }
-                                       my $rcall = $ref->call;
+                                       my $rcall = $ref->mynode->call;
                                        dbg('chan', "LOOP: already have $call on $rcall");
                                        next;
                                }
@@ -568,8 +572,12 @@ sub normal
                                dbg('chan', "$field[2] no PC19 yet, autovivified as node");
 #                              broadcast_ak1a(pc19($dxchan, $node), $dxchan, $self) unless $dxchan->{isolate};
                        }
-                       if ($field[2] eq $main::mycall || $field[2] eq $main::myalias || $field[1] eq $main::myalias || $field[1] eq $main::mycall) {
-                               dbg('chan', "LOOP: trying to disconnect me!");
+                       if ($field[1] eq $main::mycall || $field[2] eq $main::mycall) {
+                               dbg('chan', "LOOP: trying to alter config on this node from outside!");
+                               return;
+                       }
+                       if ($field[1] eq $main::myalias && DXChannel->get($field[1])) {
+                               dbg('chan', "LOOP: trying to disconnect sysop from outside!");
                                return;
                        }
                        unless ($node) {
@@ -636,7 +644,8 @@ sub normal
                                                dbg('chan', "LOOP: $call come in on wrong channel");
                                                next;
                                        }
-                                       dbg('chan', "already have $call");
+                                       my $rcall = $node->mynode->call;
+                                       dbg('chan', "already have $call on $rcall");
                                        next;
                                }
                                
@@ -888,11 +897,6 @@ sub normal
                if ($pcno == 41) {              # user info
                        # add this station to the user database, if required
                        my $user = DXUser->get_current($field[1]);
-                       if (!$user) {
-                               # then try without an SSID
-                               $field[1] =~ s/-\d+$//o;
-                               $user = DXUser->get_current($field[1]);
-                       }
                        $user = DXUser->new($field[1]) if !$user;
                        
                        if ($field[2] == 1) {