From: Rick L Bird Date: Fri, 6 May 2011 17:49:03 +0000 (-0400) Subject: Fixed Several Inherit & who() function related calls. X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=09e82ee3894b28d80ef9566579c208fec60fa1c0;p=cobramush.git Fixed Several Inherit & who() function related calls. --- diff --git a/src/bsd.c b/src/bsd.c index b864be0..b8122b9 100644 --- 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;