From 4b4fc78cfba459be6bd20cbaafff3f0606ae4116 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Thu, 15 Apr 2010 13:12:45 -0400 Subject: [PATCH] Do not allow a topic change if a user may not send to the channel (resv, cmode +m, cmode +b, cmode +q, etc.). This is only checked for local users. For optimal compatibility, a failure for this reason still returns ERR_CHANOPRIVSNEEDED. Side effect: normal users cannot change topics of resv'ed channels, even if they have ops, just like they already cannot send messages. This only matters if resv_forcepart is disabled, as the user would have been removed from the channel otherwise. Imported from charybdis changeset 1368:a224ec22c54c --- modules/m_topic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/m_topic.c b/modules/m_topic.c index afadae2..6b77805 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -116,7 +116,7 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char * return 0; } - if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_any_op(msptr)) + if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_any_op(msptr) && !can_send(chptr, source_p, msptr)) { if(IsOverride(source_p)) {