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
This commit is contained in:
JD Horelick 2010-04-15 13:12:45 -04:00
parent b752a50272
commit 4b4fc78cfb
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
return 0; 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)) if(IsOverride(source_p))
{ {