Commits

jdhore committed 8781a9e

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

Comments (0)

Files changed (1)

modules/m_topic.c

 			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))
 			{