From 26352675bc03c010da8ac3e1e51f672c48d0d268 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Wed, 27 Jun 2007 22:59:20 +0000 Subject: [PATCH] Added F_SELF flag permissions (cherry picked from commit d7dad959aeef189afcd34f80fad6d5cda47bb607) --- hdrs/flags.h | 1 + src/flags.c | 2 ++ 2 files changed, 3 insertions(+) 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 5f6439e..a855231 100644 --- a/src/flags.c +++ b/src/flags.c @@ -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; -- 2.30.2