X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Funset%2Flockout.pl;h=02169f30744ea2ac4fe790218cf64faba24fb634;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=3d17c7b7268f7f6c8ffb80a61127ecb39aa86f0f;hpb=80a2dd317e5d6b24250388b5177cbf85abee5a85;p=spider.git diff --git a/cmd/unset/lockout.pl b/cmd/unset/lockout.pl index 3d17c7b7..02169f30 100644 --- a/cmd/unset/lockout.pl +++ b/cmd/unset/lockout.pl @@ -3,7 +3,7 @@ # # Copyright (c) 1998 Iain Phillips G0RDI # -# $Id$ +# # my ($self, $line) = @_; my @args = split /\s+/, $line; @@ -13,19 +13,24 @@ my @out; my $user; my $ref; -return (1, $self->msg('e5')) if $self->priv < 9; +if ($self->priv < 9) { + Log('DXCommand', $self->call . " attempted to un-lockout @args"); + return (1, $self->msg('e5')); +} foreach $call (@args) { $call = uc $call; - unless ($self->remotecmd) { - if ($ref = DXUser->get_current($call)) { + unless ($self->remotecmd || $self->inscript) { + if ($ref = DXUser::get_current($call)) { $ref->lockout(0); $ref->put(); push @out, $self->msg("lockoutun", $call); + Log('DXCommand', $self->call . " un-locked out $call"); } else { push @out, $self->msg('e3', 'unset/lockout', $call); } } else { + Log('DXCommand', $self->call . " attempted to un-lockout $call remotely"); push @out, $self->msg('sorry'); } }