From: minima Date: Fri, 14 Sep 2001 20:11:18 +0000 (+0000) Subject: 4. Fiddle with the lockout mechanism so that set/login g1tlh also locks out X-Git-Tag: R_1_48~10 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9b0d39eb17d107b9f2b0c6c08652ea02c1d74ce;p=spider.git 4. Fiddle with the lockout mechanism so that set/login g1tlh also locks out g1tlh-1 -> g1tlh-15 UNLESS one of these is specifically unlocked. --- diff --git a/Changes b/Changes index fefa8330..5bc15e13 100644 --- a/Changes +++ b/Changes @@ -9,7 +9,10 @@ of this will happen when the general mechanism for doing that is available. no longer see many of the of talk like announces. Unfortunately you may miss the odd useful one as well (but since everything is repeated many times you probably won't :-) -3. centralise the invalid callsign check. +3. centralise the invalid callsign check so that g1tlh1 and similar calls +will not be allowed to login anymore. +4. Fiddle with the lockout mechanism so that set/login g1tlh also locks out +g1tlh-1 -> g1tlh-15 UNLESS one of these is specifically unlocked. 13Sep01======================================================================= 1. did some work on making talk more intelligent and fixed a>b problem. 2. fixed a nasty problem on input when being hit with full buffers of diff --git a/cmd/stat/user.pl b/cmd/stat/user.pl index 61a6e7bf..088cacba 100644 --- a/cmd/stat/user.pl +++ b/cmd/stat/user.pl @@ -5,6 +5,7 @@ # my ($self, $line) = @_; +return (1, $self->msg('e5')) if $self->priv < 1; my @list = split /\s+/, $line; # generate a list of callsigns @list = ($self->call) if !@list; # my channel if no callsigns 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;