From 90d513947cb8289ca592321a4b1b12a6fa2bd857 Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Fri, 6 May 2011 15:15:42 -0400 Subject: [PATCH] Various chat system fixes. A bug in present day penn that yes.. We fixed again! If your not on a channel and you use the @chat =message command It now returns either that your not allowed to speak on the channel, because your not on it. Or if its open or you have chat powers over the channel creator you can speak on it. --- src/extchat.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/extchat.c b/src/extchat.c index ab0abfe..507d82a 100644 --- a/src/extchat.c +++ b/src/extchat.c @@ -1503,10 +1503,15 @@ do_chat_by_name(dbref player, const char *name, const char *msg, int source) do_chat(player, c, msg); return 1; case CMATCH_NONE: + /* If this isn't from teh command just return 0 */ + if(!source) + return 0; if (find_channel(name, &c, player) == CMATCH_NONE) { if (source) notify(player, T("CHAT: No such channel.")); return 0; + } else { /* The channel exists! See if we can send a message to it */ + do_chat(player, c, msg); } } return 0; @@ -1546,7 +1551,7 @@ do_chat(dbref player, CHAN *chan, const char *arg1) u = onchannel(player, chan); canhear = u ? !Chanuser_Gag(u) : 0; /* If the channel isn't open, you must hear it in order to speak */ - if (!Channel_Open(chan)) { + if (!Channel_Open(chan) && !div_powover(player, ChanCreator(chan), "Chat")) { if (!u) { notify(player, T("You must be on that channel to speak on it.")); return; -- 2.30.2