From d24394ece5c05c47e6ac1b9d91bae967274ea73d Mon Sep 17 00:00:00 2001 From: nveid Date: Wed, 4 Apr 2007 07:21:24 +0000 Subject: [PATCH] RPMODE_SYS ifdefs were not appropriately wrapped around all its code in extchat.c which caused problems cauisng all fixed players to become rpagagged when RPMODE_SYS was not defined (cherry picked from commit 3a1537439f2f2f86f67b3896c13235bf1380b8d9) --- game/txt/changes/0.72p4 | 2 ++ src/extchat.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/game/txt/changes/0.72p4 b/game/txt/changes/0.72p4 index 9560420..94d67e5 100644 --- a/game/txt/changes/0.72p4 +++ b/game/txt/changes/0.72p4 @@ -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] diff --git a/src/extchat.c b/src/extchat.c index 04543fd..5853cb5 100644 --- a/src/extchat.c +++ b/src/extchat.c @@ -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; -- 2.30.2