Added F_SELF flag permissions
authorAri Johnson <ari@cobramush.org>
Wed, 27 Jun 2007 22:59:20 +0000 (22:59 +0000)
committerAri Johnson <ari@theari.com>
Thu, 24 Mar 2011 15:58:45 +0000 (15:58 +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 f9a0e1fb0f9fe09e824c2ffb2640d0db3802a5cc..c52a32d6f3adf17d8e9b3aa252dca79ef1efe02f 100644 (file)
@@ -1212,6 +1212,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;