4. Fiddle with the lockout mechanism so that set/login g1tlh also locks out
authorminima <minima>
Fri, 14 Sep 2001 20:11:18 +0000 (20:11 +0000)
committerminima <minima>
Fri, 14 Sep 2001 20:11:18 +0000 (20:11 +0000)
g1tlh-1 -> g1tlh-15 UNLESS one of these is specifically unlocked.

Changes
cmd/stat/user.pl
perl/cluster.pl

diff --git a/Changes b/Changes
index fefa8330f3f0fb16374f80934a0f56cf4fbfbf73..5bc15e13d3b3f22eee74c16ad2a070239b900d48 100644 (file)
--- 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 
index 61a6e7bf9eb60c156939dbe0285529d71ac2aa8b..088cacba6d8c97bec3a258b6400dabdf6ff3a5c3 100644 (file)
@@ -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
 
index 4cb4ea6455824f9ddb604194a5cdba625a216484..3596fa00432169199ff9dbcf55121c79c00d4ea7 100755 (executable)
@@ -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;