From: nveid Date: Sun, 29 Oct 2006 16:19:47 +0000 (+0000) Subject: chownremote - allows players to remotely chown objects as long as they have X-Git-Tag: 0.73~218 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=1482404d8bf4898ef8130eba88568645493889ea;p=cobramush.git chownremote - allows players to remotely chown objects as long as they have the chown power over the object --- diff --git a/game/txt/changes/0.73 b/game/txt/changes/0.73 index 7fa4fab..84504be 100644 --- a/game/txt/changes/0.73 +++ b/game/txt/changes/0.73 @@ -7,7 +7,10 @@ CobraMUSH Version 0.73 Flags: * LEAVE_BEHIND - When a player leaves the location of someone they're flowing with this flag it unfollows - the follower. + the follower. [RLB] + Commands: + * @chown now allows players to do remote chowns as long + as they have the Chown power over the object. [RLB] Fixes: * All fixes from 0.72 stable development series diff --git a/hdrs/mushdb.h b/hdrs/mushdb.h index 2ccafc6..6a8cc26 100644 --- a/hdrs/mushdb.h +++ b/hdrs/mushdb.h @@ -76,6 +76,7 @@ #define Can_RPEMIT(x) (div_powover(x,x, "RPEmit") || (Inherit_Powers(x) || div_powover(Owner(x),Owner(x), "RPEmit")) ||Admin(x)) #define Can_RPCHAT(x) (div_powover(x, x, "RPChat") || (Inherit_Powers(x) || div_powover(Owner(x),Owner(x), "RPChat")) || Admin(x)) #define Inherit_Powers(x) (Inherit(x) && Inheritable(Owner(x))) +#define CanChown(x,y) (OOREF(x,div_powover(x,y,"Chown"),div_powover(ooref,y,"Chown"))) /* Permission macros */ #define TC_Can_See_Flag(p,t,f) ((!(f->perms & (F_DARK | F_MDARK | F_ODARK | F_DISABLED)) || \ diff --git a/src/set.c b/src/set.c index 34228ac..53780a1 100644 --- a/src/set.c +++ b/src/set.c @@ -211,7 +211,7 @@ do_chown(dbref player, const char *name, const char *newobj, int preserve) notify(player, T("Permission denied.")); return; } - if (IsThing(thing) && !Admin(player) && + if (IsThing(thing) && !CanChown(player,thing) && !(GoodObject(Location(thing)) && (Location(thing) == player))) { notify(player, T("You must carry the object to @chown it.")); return;