]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_topic.c
Do not allow a topic change if a user may not send to the channel
[irc/rqf/shadowircd.git] / modules / m_topic.c
index 4b6d44bb0bbd618ad599a9b524e65b9826535a1b..6b7780523e4cbb42840d71517613be645885fb4e 100644 (file)
@@ -116,7 +116,7 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
                        return 0;
                }
 
-               if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_chanop(msptr))
+               if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_any_op(msptr) && !can_send(chptr, source_p, msptr))
                {
                        if(IsOverride(source_p))
                        {
@@ -125,7 +125,7 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
                                                get_oper_name(source_p), chptr->chname);
                                sendto_server(NULL, chptr, NOCAPS, NOCAPS,
                                                ":%s WALLOPS :%s is overriding TOPIC on [%s]",
-                                               use_id(source_p), get_oper_name(source_p), chptr->chname);
+                                               me.name, get_oper_name(source_p), chptr->chname);
                        }
                        else
                        {