1. Added a bit more checking to the rcmd thing to make more sure that this
[spider.git] / cmd / set / privilege.pl
index 2513f85b82ee6721f83316e0a2ce8fee9c272f98..4e30229775a901663e59cea75cd20cc53f9db5ed 100644 (file)
@@ -23,19 +23,23 @@ if ($priv < 0 || $priv > 9) {
 
 foreach $call (@args) {
        $call = uc $call;
-       if ($ref = DXChannel->get($call)) {
-               $ref->priv($priv);
-               $ref->user->priv($priv);
-               $ref->user->put();
-       }
-       if (!$ref && ($user = DXUser->get($call))) {
-               $user->priv($priv);
-               $user->put();
-       }
-       if ($ref || $user) {
-               push @out, $self->msg('priv', $call);
+       unless ($self->remotecmd) {
+               if ($ref = DXChannel->get($call)) {
+                       $ref->priv($priv);
+                       $ref->user->priv($priv);
+                       $ref->user->put();
+               }
+               if (!$ref && ($user = DXUser->get($call))) {
+                       $user->priv($priv);
+                       $user->put();
+               }
+               if ($ref || $user) {
+                       push @out, $self->msg('priv', $call);
+               } else {
+                       push @out, $self->msg('e3', "Set Privilege", $call);
+               }
        } else {
-               push @out, $self->msg('e3', "Set Privilege", $call);
+               push @out, $self->msg('sorry');
        }
 }
 return (1, @out);