RPMODE_SYS ifdefs were not appropriately wrapped around all its code in extchat.c...
authornveid <nveid@cobramush.org>
Wed, 4 Apr 2007 07:21:24 +0000 (07:21 +0000)
committerAri Johnson <ari@theari.com>
Thu, 24 Mar 2011 15:58:45 +0000 (15:58 +0000)
(cherry picked from commit 3a1537439f2f2f86f67b3896c13235bf1380b8d9)

game/txt/changes/0.72p4
src/extchat.c

index 95604208394e218d468f72933869182c450cc4f1..94d67e57c9ab52d486ff7b07efcd027cc1583233 100644 (file)
@@ -10,3 +10,5 @@ CobraMUSH Version 0.72p4
 
   Fixes:
     * Flags stored in the main database were not being loaded correctly. [RLB]
+    * Parts of the RPMODE_SYS were not appropriately enclosed in ifdef statements, 
+      causing all non-privileged players to be rpgagged on channels. [RLB]
index 687da5c93576364fcb1305eb9f91c58328e7852f..59bcea7230234d2a9bfbc99e2514a14792d79458 100644 (file)
@@ -1625,7 +1625,7 @@ do_chat(dbref player, CHAN *chan, const char *arg1)
     } else if(RPMODE(player) && !Can_RPCHAT(player)) {
            notify(player, T("You can't do that in RPMODE."));
            return;
-#endif
+#endif /* RPMODE_SYS */
     }
   }
 
@@ -1743,7 +1743,7 @@ do_cemit(dbref player, const char *name, const char *msg, int flags)
     } else if(RPMODE(player) && !Can_RPCHAT(player)) {
            notify(player, T("You can't do that in RPMODE."));
            return;
-#endif
+#endif /* RPMODE_SYS */
     }
   }
 
@@ -2853,7 +2853,11 @@ do_channel_who(dbref player, CHAN *chan)
       if (IsThing(who))
        safe_format(tbuf1, &bp, "(#%d)", who);
       sf = 0;
-      if (Chanuser_Hide(u) || Chanuser_Gag(u) || (RPMODE(u->who) && !Can_RPCHAT(u->who))) {
+      if (Chanuser_Hide(u) || Chanuser_Gag(u)
+#ifdef RPMODE_SYS
+       ||  (RPMODE(u->who) && !Can_RPCHAT(u->who))
+#endif /* RPMODE_SYS */
+         ) {
              safe_str(" (", tbuf1, &bp);
              sf++;
       }
@@ -2866,11 +2870,13 @@ do_channel_who(dbref player, CHAN *chan)
         safe_str("gagging", tbuf1, &bp);
         sf++;
       }
+#ifdef RPMODE_SYS
       if(RPMODE(u->who) && !Can_RPCHAT(u->who)) {
              if(sf > 1) safe_chr(',', tbuf1, &bp);
              safe_str("rpgag", tbuf1, &bp);
              sf++;
       }
+#endif /* RPMODE_SYS */
       if(sf > 0)
              safe_chr(')', tbuf1, &bp);
     }
@@ -3317,7 +3323,10 @@ na_channel(dbref current, void *data)
     nu = u->next;
     cont = (!GoodObject(current) ||
            (nac->checkquiet && Chanuser_Quiet(u)) ||
-           Chanuser_Gag(u) ||  (RPMODE(current) && !Can_RPCHAT(current))
+           Chanuser_Gag(u)
+#ifdef RPMODE_SYS
+          ||  (RPMODE(current) && !Can_RPCHAT(current))
+#endif
            || (IsPlayer(current) && !Connected(current)));
   } while (cont);
   nac->u = nu;