X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Flockout.pl;h=feb326eb77b5b761cd47fe51533b940f2392bef3;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=911a82887977390027ce527b274723187d01d341;hpb=f38b81521d0430ef67023c3afaab2f4180e5b3bf;p=spider.git diff --git a/cmd/set/lockout.pl b/cmd/set/lockout.pl index 911a8288..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,19 +13,28 @@ 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; - if ($ref = DXUser->get_current($call)) { - $ref->lockout(1); - $ref->put(); - push @out, $self->msg("lockout", $call); + unless ($self->remotecmd || $self->inscript) { + if ($ref = DXUser::get_current($call)) { + $ref->lockout(1); + $ref->put(); + push @out, $self->msg("lockout", $call); + } else { + $ref = DXUser->new($call); + $ref->lockout(1); + $ref->put(); + push @out, $self->msg("lockoutc", $call); + } + Log('DXCommand', $self->call . " locked out $call"); } else { - $ref = DXUser->new($call); - $ref->lockout(1); - $ref->put(); - push @out, $self->msg("lockoutc", $call); + Log('DXCommand', $self->call . " attempted to lockout $call remotely"); + push @out, $self->msg('sorry'); } } return (1, @out);