remove all traces of Aranea.
[spider.git] / cmd / set / lockout.pl
index 492120b9b2a008f65c9c74b5b67e7fee5d90c1d6..d25a526108637d53755fef47593900b2dfa6eda4 100644 (file)
@@ -13,11 +13,14 @@ 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) {
+       unless ($self->remotecmd || $self->inscript) {
                if ($ref = DXUser->get_current($call)) {
                        $ref->lockout(1);
                        $ref->put();
@@ -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');
        }
 }