Add LOUD flag
authorAri Johnson <ari@theari.com>
Mon, 29 Sep 2008 15:55:57 +0000 (15:55 +0000)
committerAri Johnson <ari@theari.com>
Mon, 29 Sep 2008 15:55:57 +0000 (15:55 +0000)
game/txt/hlp/cobra_flag.hlp
hdrs/dbdefs.h
hdrs/extchat.h
hdrs/mushdb.h
src/flags.c

index 85776d22075e917e7063197d1be7453e49213e68..49fb4d88c3b0f691644a2eaf9dcf20c0d2f35bb7 100644 (file)
@@ -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
index c643456556433d73713848c98fabbe39b98883d2..df23cc0b376b1cfa399ae447711322058baeb698 100644 (file)
@@ -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))
index 1867333c8a6d6cf17b3a9ef5f8a24914b259499c..6e09fe683c8a0c87d88f05e2303d19eeabc94ef4 100644 (file)
@@ -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) \
index 499d878213f850126ea4aeec58f658598cb0a79e..e5c0a98160bedb0692bc21c284459dbb46752da8 100644 (file)
@@ -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)
index 64f282976bcbecfc531e2ed60df69d4440b46a22..d239fffb2a859ce2e39d8a283a7d8cacb9e76f2f 100644 (file)
@@ -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);