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@cobramush.org>
Wed, 4 Apr 2007 05:49:46 +0000 (05:49 +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 04543fdedd1dc52ad779a359d103034c81fe01a9..5853cb562797727bbb5c84f18a6406b212b0795f 100644 (file)
@@ -1619,7 +1619,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 */
     }
   }
 
@@ -1737,7 +1737,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 */
     }
   }
 
@@ -2780,7 +2780,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++;
       }
@@ -2793,11 +2797,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);
     }
@@ -3244,7 +3250,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;