From 60ba7b3c36ce4aca191c9ec946483d2191cdbdae Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Mon, 29 Sep 2008 15:55:57 +0000 Subject: [PATCH] Add LOUD flag --- game/txt/hlp/cobra_flag.hlp | 5 +++++ hdrs/dbdefs.h | 3 ++- hdrs/extchat.h | 2 +- hdrs/mushdb.h | 2 +- src/flags.c | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/game/txt/hlp/cobra_flag.hlp b/game/txt/hlp/cobra_flag.hlp index 85776d2..49fb4d8 100644 --- a/game/txt/hlp/cobra_flag.hlp +++ b/game/txt/hlp/cobra_flag.hlp @@ -336,6 +336,11 @@ which are available. only specific individuals. See also: @haven +& LOUD + Flag: LOUD (all types) + + A LOUD object overrides speech, channel speech, and interaction + locks. This flag can only be set by Privileged players. & TRUST & INHERIT diff --git a/hdrs/dbdefs.h b/hdrs/dbdefs.h index c643456..df23cc0 100644 --- a/hdrs/dbdefs.h +++ b/hdrs/dbdefs.h @@ -84,7 +84,7 @@ extern dbref first_free; /* pointer to free list */ /* Can guy talk? */ #define Mute(x) (has_flag_by_name(x, "MUTE", TYPE_THING | TYPE_PLAYER | TYPE_ROOM)) #define IsMuted(x,y) (Mute(x) || Mute(Location(x))) -#define CanSpeak(x,y) (!Mute(x) && (Admin(x) || (!Mute(y) && eval_lock(x, y, Speech_Lock)))) +#define CanSpeak(x,y) (!Mute(x) && (Admin(x) || Loud(x) || (!Mute(y) && eval_lock(x, y, Speech_Lock)))) /******* Player toggles */ #define Connected(x) (IS(x, TYPE_PLAYER, "CONNECTED")) /* 0x200 */ @@ -156,6 +156,7 @@ extern dbref first_free; /* pointer to free list */ #define Inherit(x) (has_flag_by_name(x, "INHERIT", TYPE_THING|TYPE_EXIT|TYPE_ROOM)) #define Light(x) (has_flag_by_name(x, "LIGHT", NOTYPE)) #define LinkOk(x) (has_flag_by_name(x, "LINK_OK", NOTYPE)) +#define Loud(x) (has_flag_by_name(x, "LOUD", NOTYPE)) #define Mistrust(x) (has_flag_by_name(x, "MISTRUST", TYPE_THING|TYPE_EXIT|TYPE_ROOM)) #define NoCommand(x) (has_flag_by_name(x, "NO_COMMAND", NOTYPE)) #define NoWarn(x) (has_flag_by_name(x, "NOWARN", NOTYPE)) diff --git a/hdrs/extchat.h b/hdrs/extchat.h index 1867333..6e09fe6 100644 --- a/hdrs/extchat.h +++ b/hdrs/extchat.h @@ -194,7 +194,7 @@ int ChanObjCheck _((CHAN *c)); (eval_chan_lock(c,p,CLOCK_JOIN))) #define Chan_Can_Speak(c,p) \ (Chan_Can_Access(c,p) && \ - (eval_chan_lock(c,p, CLOCK_SPEAK))) + (Loud(p) || eval_chan_lock(c,p, CLOCK_SPEAK))) #define Chan_Can_Cemit(c,p) \ (!Channel_NoCemit(c) && Chan_Can_Speak(c,p)) #define Chan_Can_Modify(c,p) \ diff --git a/hdrs/mushdb.h b/hdrs/mushdb.h index 499d878..e5c0a98 100644 --- a/hdrs/mushdb.h +++ b/hdrs/mushdb.h @@ -185,7 +185,7 @@ int unfindable(dbref); /* Can from pass to's @lock/interact? */ #define Pass_Interact_Lock(from,to) \ - (Can_Pemit(from, to) || eval_lock(from, to, Interact_Lock)) + (Can_Pemit(from, to) || Loud(from) || eval_lock(from, to, Interact_Lock)) /* How many pennies can you have? */ #define TC_Max_Pennies(p) (Guest(p) ? MAX_GUEST_PENNIES : MAX_PENNIES) diff --git a/src/flags.c b/src/flags.c index 64f2829..d239fff 100644 --- a/src/flags.c +++ b/src/flags.c @@ -759,6 +759,7 @@ flag_add_additional(void) F_PRIVILEGE); add_flag("ORPHAN", 'i', NOTYPE, F_ANY, F_ANY); add_flag("TRACK_MONEY", '\0', TYPE_PLAYER, F_ANY, F_ANY); + add_flag("LOUD", '\0', NOTYPE, F_PRIVILEGE, F_ANY); add_flag("INPROGRAM", '\0', TYPE_PLAYER, F_INTERNAL, F_INTERNAL); add_flag("BUILDER", '\0', TYPE_PLAYER, F_PRIVILEGE, F_PRIVILEGE); add_flag("AUTH_PARENT", '\0', NOTYPE, F_PRIVILEGE, F_PRIVILEGE); -- 2.30.2