1. Added a bit more checking to the rcmd thing to make more sure that this
[spider.git] / cmd / set / lockout.pl
index 911a82887977390027ce527b274723187d01d341..492120b9b2a008f65c9c74b5b67e7fee5d90c1d6 100644 (file)
@@ -17,15 +17,19 @@ return (1, $self->msg('e5')) if $self->priv < 9;
 
 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) {
+               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);
+               }
        } else {
-               $ref = DXUser->new($call);
-               $ref->lockout(1);
-               $ref->put();
-               push @out, $self->msg("lockoutc", $call);
+               push @out, $self->msg('sorry');
        }
 }
 return (1, @out);