From: Ari Johnson Date: Wed, 27 Jun 2007 22:59:20 +0000 (+0000) Subject: Added F_SELF flag permissions X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=d7dad959aeef189afcd34f80fad6d5cda47bb607;p=cobramush.git Added F_SELF flag permissions --- diff --git a/hdrs/flags.h b/hdrs/flags.h index d087bd1..77ef8dc 100644 --- a/hdrs/flags.h +++ b/hdrs/flags.h @@ -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 */ diff --git a/src/flags.c b/src/flags.c index f9a0e1f..c52a32d 100644 --- a/src/flags.c +++ b/src/flags.c @@ -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;