Added F_SELF flag permissions
authorAri Johnson <ari@cobramush.org>
Wed, 27 Jun 2007 22:59:20 +0000 (22:59 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 4 Apr 2007 05:49:46 +0000 (05:49 +0000)
(cherry picked from commit d7dad959aeef189afcd34f80fad6d5cda47bb607)

hdrs/flags.h
src/flags.c

index d087bd1332bfbe16c01891afca2c3ee76484f666..77ef8dc282716158fe72702173c342befe0d56e8 100644 (file)
@@ -140,6 +140,7 @@ extern void decompile_flags(dbref player, dbref thing, const char *name);
 #define F_ODARK         0x2000 /* owner/admin/God can see this flag */
 #define F_DISABLED      0x4000 /* flag can't be used */
 /* RESERVED            0x8000 */
+#define F_SELF         0x10000 /* can set on self, regardless of the above */
 
 
 /* we don't use these anymore.. but kept aroudn for DB conversion */
index 5f6439eeeacb6efe8095a2ec5bc94bbebde0c1bd..a855231bc299252d1feac072410b4687ace80c14 100644 (file)
@@ -1211,6 +1211,8 @@ can_set_flag(dbref player, dbref thing, FLAG *flagp, int negate)
     notify(player, T("You must @lock/zone before you can set a player ZONE"));
     return 0;
   }
+  if ((myperms & F_SELF) && (player == thing))
+    return 1;
   /* Privilege, permissions work if a) they hav priv power & b) they control the thing */
   if ((myperms & F_PRIVILEGE) && !(div_powover(player, player, "Privilege") && controls(player,thing)))
     return 0;