X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=3596fa00432169199ff9dbcf55121c79c00d4ea7;hb=f9b0d39eb17d107b9f2b0c6c08652ea02c1d74ce;hp=4cb4ea6455824f9ddb604194a5cdba625a216484;hpb=1247daf765691411848e68517bd1bb59cdaf731f;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 4cb4ea64..3596fa00 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -156,6 +156,20 @@ sub new_channel already_conn($conn, $call, $mess); return; } + + # is he locked out ? + my $basecall = $call; + $basecall =~ s/-\d+$//; + my $baseuser = DXUser->get($basecall); + if ($baseuser && $baseuser->lockout) { + my $lock = $user->lockout if $user; + if (!$user || !defined $lock || $lock) { + my $host = $conn->{peerhost} || "unknown"; + Log('DXCommand', "$call on $host is locked out, disconnected"); + $conn->disconnect; + return; + } + } if ($user) { $user->{lang} = $main::lang if !$user->{lang}; # to autoupdate old systems @@ -163,13 +177,6 @@ sub new_channel $user = DXUser->new($call); } - # is he locked out ? - if ($user->lockout) { - my $host = $conn->{peerhost} || "unknown"; - Log('DXCommand', "$call on $host is locked out, disconnected"); - $conn->disconnect; - return; - } # create the channel $dxchan = DXCommandmode->new($call, $conn, $user) if $user->is_user;