Fixed Several Inherit & <x>who() function related calls.
authorRick L Bird <nveid@yahoo.com>
Fri, 6 May 2011 17:49:03 +0000 (13:49 -0400)
committerRick L Bird <nveid@yahoo.com>
Fri, 6 May 2011 17:49:03 +0000 (13:49 -0400)
src/bsd.c

index b864be00edd4787a67dd29e47a1318243e645d2e..b8122b92bd69c718c7fd125afadc394f67719d46 100644 (file)
--- a/src/bsd.c
+++ b/src/bsd.c
@@ -4110,8 +4110,7 @@ FUNCTION(fun_nwho)
       return;
     }
 
-  if (!Priv_Who(executor)
-      && !(Inherit_Powers(executor) && Priv_Who(Owner(executor)))) 
+  if (!Priv_Who(executor))
     powered = 0;
   }
 
@@ -4135,8 +4134,7 @@ FUNCTION(fun_lwho)
   int objid = (strchr(called_as, 'D') != NULL);
   int powered = 0;
 
-  if (!(strchr(called_as, 'M') != NULL) && !Priv_Who(executor)
-      && !(Inherit_Powers(executor) && Priv_Who(Owner(executor)))) 
+  if (!(strchr(called_as, 'M') != NULL) && Priv_Who(executor))
     powered = 1;
  
   first = 1;
@@ -4156,8 +4154,7 @@ FUNCTION(fun_lwho)
       safe_str(T(e_perm), buff, bp);
       return;
     }
-  if (!Priv_Who(executor)
-      && !(Inherit_Powers(executor) && Priv_Who(Owner(executor)))) 
+  if (!Priv_Who(executor))
       powered = 0;
   } else
     victim = executor;
@@ -4243,8 +4240,7 @@ lookup_desc(dbref executor, const char *name)
     int fd = parse_integer(name);
 
     d = im_find(descs_by_fd, fd);
-    if (d && (Priv_Who(executor) || d->player == executor
-              || (Inherit_Powers(executor) && Priv_Who(Owner(executor)))))
+    if (d && (Priv_Who(executor) || d->player == executor))
       return d;
     else
       return NULL;
@@ -4262,8 +4258,7 @@ lookup_desc(dbref executor, const char *name)
       /* walk the descriptor list looking for a match of a dbref */
       DESC_ITER_CONN(d) {
         if ((d->player == target) &&
-            (!Hidden(d) || Priv_Who(executor) ||
-             (Inherit_Powers(executor) && Priv_Who(Owner(executor)))) &&
+            (!Hidden(d) || Priv_Who(executor)) &&
             (!match || (d->last_time > match->last_time)))
           match = d;
       }
@@ -4719,24 +4714,23 @@ FUNCTION(fun_lports)
   int online = 1;
   int offline = 0;
 
-  if (!Priv_Who(executor)
-      && !(Inherit_Powers(executor) && Priv_Who(Owner(executor)))) {
+  if (!Priv_Who(executor)) {
     safe_str(T(e_perm), buff, bp);
     return;
   }
 
   if (nargs && args[0] && *args[0]) {
     /* An argument was given. Find the victim and adjust perms */
-    if ((victim = noisy_match_result(executor, args[0], NOTYPE,
-                                     MAT_EVERYTHING)) == NOTHING) {
+    if ((victim = noisy_match_result(executor, args[0], NOTYPE, MAT_EVERYTHING)) == NOTHING) {
       safe_str(T(e_notvis), buff, bp);
       return;
     }
-  if (!Priv_Who(executor)
-      && !(Inherit_Powers(executor) && Priv_Who(Owner(executor))))
+
+  if (!Priv_Who(executor)) 
       powered = 0;
   }
 
+
   if (nargs > 1 && args[1] && *args[1]) {
                if (string_prefix("all", args[1])) {
                        offline = online = 1;
@@ -4788,8 +4782,7 @@ FUNCTION(fun_ports)
     target = match_result(executor, args[0], TYPE_PLAYER,
                           MAT_ABSOLUTE | MAT_PLAYER | MAT_ME);
   }
-  if (target != executor && !Priv_Who(executor)
-      && !(Inherit_Powers(executor) && Priv_Who(Owner(executor)))) {
+  if (target != executor && !Priv_Who(executor)) {
     /* This should probably be a safe_str */
     notify(executor, T("Permission denied."));
     return;