else
from = sptr;
member = find_channel_member(sptr, chptr);
- /* if +n and not @'d, return an error and ignore the topic */
+ /* if +t and not @'d, return an error and ignore the topic */
if ((chptr->mode.mode & MODE_TOPICLIMIT) != 0 && (!member || !IsChanOp(member)))
{
send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
return;
}
- if (member && IsDelayedJoin(member))
- RevealDelayedJoin(member);
+ if (!client_can_send_to_channel(sptr, chptr, 1) && !IsChannelService(sptr)) {
+ send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
+ return;
+ }
/* Note if this is just a refresh of an old topic, and don't
* send it to all the clients to save bandwidth. We still send
* it to other servers as they may have split and lost the topic.