mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
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.
This commit is contained in:
parent
bd44fc7b09
commit
406478d224
1 changed files with 4 additions and 1 deletions
|
@ -114,7 +114,10 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
|
|||
return 0;
|
||||
}
|
||||
|
||||
if((chptr->mode.mode & MODE_TOPICLIMIT) == 0 || is_chanop(msptr))
|
||||
if(((chptr->mode.mode & MODE_TOPICLIMIT) == 0 ||
|
||||
is_chanop(msptr)) &&
|
||||
(!MyClient(source_p) ||
|
||||
can_send(chptr, source_p, msptr)))
|
||||
{
|
||||
char topic_info[USERHOST_REPLYLEN];
|
||||
rb_sprintf(topic_info, "%s!%s@%s",
|
||||
|
|
Loading…
Reference in a new issue