X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Funset%2Flockout.pl;h=d8c8a1265ea8f4fd80c7b6550e1043d4ca7011c7;hb=8007adef1e949086cb27444d61f554ba456c0685;hp=71641c6e38b81bee2c5109039ef7c72e6d480eab;hpb=337f38bfac57a5e5df34c63094fb869b0e2f6bee;p=spider.git diff --git a/cmd/unset/lockout.pl b/cmd/unset/lockout.pl index 71641c6e..d8c8a126 100644 --- a/cmd/unset/lockout.pl +++ b/cmd/unset/lockout.pl @@ -13,16 +13,25 @@ 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; - if ($ref = DXUser->get_current($call)) { - $ref->lockout(0); - $ref->put(); - push @out, $self->msg("lockoutun", $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 { - push @out, $self->msg('e3', 'unset/lockout', $call); + Log('DXCommand', $self->call . " attempted to un-lockout $call remotely"); + push @out, $self->msg('sorry'); } } return (1, @out);