]> scm.dxcluster.org Git - spider.git/commitdiff
the last warnings??
authorDirk Koopman <djk@tobit.co.uk>
Thu, 6 Jan 2022 00:20:23 +0000 (00:20 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 6 Jan 2022 00:20:23 +0000 (00:20 +0000)
perl/DXCommandmode.pm
perl/DXProtHandle.pm

index fda298b13e54ddf8e8fe3c333e47b2cc6550ce5c..b89e1d3c7f540a8bcbc52e735c47742a317946d9 100644 (file)
@@ -157,7 +157,7 @@ sub start
        # establish slug queue, if required
        $self->{sluggedpcs} = [];
        $self->{isslugged} = $DXProt::pc92_slug_changes + $DXProt::last_pc92_slug + 5 if $DXProt::pc92_slug_changes;
-       $self->{isslugged} = 0 if $self->{priv} || $user->registered || $user->homenode eq $main::mycall;
+       $self->{isslugged} = 0 if $self->{priv} || $user->registered || ($user->homenode && $user->homenode eq $main::mycall);
 
        # send the relevant MOTD
        $self->send_motd;
index 2cf116d4a6107007b855fc1a70fb4bde77b750f0..2055a2941d861f681b6e8a41df6a6f442f19c582 100644 (file)
@@ -781,6 +781,7 @@ sub check_add_user
                } else {
                        $user->homenode($homenode) if $homenode;
                        $user->node($homenode);
+                       $user->priv(0);
                }
                $user->lastin($main::systime); # this make it last longer than just this invocation
                $user->put;                             # just to make sure it gets written away!!!
@@ -789,7 +790,7 @@ sub check_add_user
 
        # this is to fix a problem I introduced some build ago by using this function for users
        # whereas it was only being used for nodes.
-       if ($user->is_user && $user->lockout && $user->priv == 1) {
+       if ($user->is_user && $user->lockout && ($user->priv // 0) == 1) {
                $user->priv(0);
                $user->lockout(0);
                dbg("DXProt: PC92 user record for $call depriv'd and unlocked");