From: Dirk Koopman Date: Thu, 6 Jan 2022 00:20:23 +0000 (+0000) Subject: the last warnings?? X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b7aa32ea996597d0e164197b06fe181a846dbf6;p=spider.git the last warnings?? --- diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index fda298b1..b89e1d3c 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -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; diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index 2cf116d4..2055a294 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -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");