X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Flockout.pl;h=feb326eb77b5b761cd47fe51533b940f2392bef3;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=492120b9b2a008f65c9c74b5b67e7fee5d90c1d6;hpb=80a2dd317e5d6b24250388b5177cbf85abee5a85;p=spider.git diff --git a/cmd/set/lockout.pl b/cmd/set/lockout.pl index 492120b9..feb326eb 100644 --- a/cmd/set/lockout.pl +++ b/cmd/set/lockout.pl @@ -3,7 +3,7 @@ # # Copyright (c) 1998 Iain Phillips G0RDI # -# $Id$ +# # my ($self, $line) = @_; my @args = split /\s+/, $line; @@ -13,12 +13,15 @@ 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 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(1); $ref->put(); push @out, $self->msg("lockout", $call); @@ -28,7 +31,9 @@ foreach $call (@args) { $ref->put(); push @out, $self->msg("lockoutc", $call); } + Log('DXCommand', $self->call . " locked out $call"); } else { + Log('DXCommand', $self->call . " attempted to lockout $call remotely"); push @out, $self->msg('sorry'); } }