chownremote - allows players to remotely chown objects as long as they have
authornveid <nveid@comcast.net>
Sun, 29 Oct 2006 16:19:47 +0000 (16:19 +0000)
committernveid <nveid@comcast.net>
Sun, 29 Oct 2006 16:19:47 +0000 (16:19 +0000)
the chown power over the object

game/txt/changes/0.73
hdrs/mushdb.h
src/set.c

index 7fa4fabceebebfe2a1637764f43044f24be353a7..84504be4492e25f42bf8acbee2154ffe79d22e9c 100644 (file)
@@ -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
 
index 2ccafc6b13f5064732c4f0a5d611526eb8af60c3..6a8cc26ba1cc438655dc9685503dd01bdd71225d 100644 (file)
@@ -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)) || \
index 34228ac19f6b6593a662ba1b2363b04e8eeb0308..53780a1e7dbed2e21d1f1303de83402a7cdbce6a 100644 (file)
--- 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;