X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/dab6375a1ee20c724bf93dda872245567b11d733..8a889b0a5ffbac79bea29658c7c0f4a89f9b7be8:/modules/m_topic.c diff --git a/modules/m_topic.c b/modules/m_topic.c index 3e8b4bf..2fd2072 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -38,6 +38,7 @@ #include "parse.h" #include "modules.h" #include "packet.h" +#include "tgchange.h" static int m_topic(struct Client *, struct Client *, int, const char **); static int ms_topic(struct Client *, struct Client *, int, const char **); @@ -115,6 +116,15 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char * return 0; } + if(MyClient(source_p) && !is_chanop_voiced(msptr) && + !IsOper(source_p) && + !add_channel_target(source_p, chptr)) + { + sendto_one(source_p, form_str(ERR_TARGCHANGE), + me.name, source_p->name, chptr->chname); + return 0; + } + if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_any_op(msptr)) { if(IsOverride(source_p))