From: nveid Date: Wed, 4 Apr 2007 07:21:24 +0000 (+0000) Subject: RPMODE_SYS ifdefs were not appropriately wrapped around all its code in extchat.c... X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=0d6c7780889710af25233d554fab8fbd5ef29105;p=cobramush.git 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) --- 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 687da5c..59bcea7 100644 --- a/src/extchat.c +++ b/src/extchat.c @@ -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;