X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FExtMsg.pm;h=0ca2de83c6f5d367a67fbb4dc87d0267372b84f0;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=dd97475aaa6a336be70186f2155e629f708d2f30;hpb=16d19a14ff3c7622cb81ab0312d674fde6b2af83;p=spider.git diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index dd97475a..0ca2de83 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -104,9 +104,9 @@ sub dequeue $msg = uc $msg; if (is_callsign($msg) && $msg !~ m|/| ) { my $sort = $conn->{csort}; - $sort = 'local' if $conn->{peerhost} eq "127.0.0.1"; + $sort = 'local' if $conn->{peerhost} =~ /127\.\d+\.\d+\.\d+$/ || $conn->{peerhost} eq '::1'; my $uref; - if ($main::passwdreq || ($uref = DXUser->get_current($msg)) && $uref->passwd ) { + if ($main::passwdreq || ($uref = DXUser::get_current($msg)) && $uref->passwd ) { $conn->conns($msg); $conn->{state} = 'WP'; $conn->{decho} = $conn->{echo}; @@ -120,13 +120,13 @@ sub dequeue $conn->disconnect; } } elsif ($conn->{state} eq 'WP' ) { - my $uref = DXUser->get_current($conn->{call}); + my $uref = DXUser::get_current($conn->{call}); $msg =~ s/[\r\n]+$//; if ($uref && $msg eq $uref->passwd) { my $sort = $conn->{csort}; $conn->{echo} = $conn->{decho}; delete $conn->{decho}; - $sort = 'local' if $conn->{peerhost} eq "127.0.0.1"; + $sort = 'local' if $conn->{peerhost} =~ /127\.\d+\.\d+\.\d+$/ || $conn->{peerhost} eq '::1'; $conn->{usedpasswd} = 1; $conn->to_connected($conn->{call}, 'A', $sort); } else {