diff --git a/Changes b/Changes index 70b7f6741..bb6119aa7 100644 --- a/Changes +++ b/Changes @@ -35,3 +35,5 @@ - You can no longer specify an *@unrealircd.com/org, or unreal-*@lists.sourceforge.net email as your KLINE_ADDRESS (the "Why am I K:lined?" messages got too annoying) - Removed some irc.flirt.org references. +- Made it so if a channel is +O or +A and you are not +O or +A and not in the channel, you can not + /topic #channel same for +b if not +o or on the channel. Suggested by Sysop_Mars diff --git a/src/channel.c b/src/channel.c index 1da5f0b05..0b92532fd 100644 --- a/src/channel.c +++ b/src/channel.c @@ -3487,6 +3487,12 @@ int m_topic(cptr, sptr, parc, parv) if (!topic) /* only asking for topic */ { + if ((chptr->mode.mode & MODE_OPERONLY && !IsAnOper(sptr) && !IsMember(sptr, chptr)) || + (chptr->mode.mode & MODE_ADMONLY && !IsAdmin(sptr) && !IsMember(sptr, chptr)) || + (is_banned(sptr,sptr,chptr) && !IsAnOper(sptr) && !IsMember(sptr, chptr))) { + sendto_one(sptr, err_str(ERR_NOTONCHANNEL), me.name, parv[0], name); + return; + } if (!chptr->topic) sendto_one(sptr, rpl_str(RPL_NOTOPIC), me.name, parv[0], chptr->chname);