]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Modified FTOPIC to not send out the TOPIC command if the topic text is unchanged
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 5 Dec 2005 13:38:42 +0000 (13:38 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 5 Dec 2005 13:38:42 +0000 (13:38 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2194 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index 23c1a7150006f5c02b9080c7f3653faac60e90b7..cbf7f5b066b384f2f5f6eecd53615caa5d1f0a30 100644 (file)
@@ -527,10 +527,15 @@ class TreeSocket : public InspSocket
                {
                        if ((ts >= c->topicset) || (!*c->topic))
                        {
+                               std::string oldtopic = c->topic;
                                strlcpy(c->topic,topic.c_str(),MAXTOPIC);
                                strlcpy(c->setby,setby.c_str(),NICKMAX);
                                c->topicset = ts;
-                               WriteChannelWithServ((char*)source.c_str(), c, "TOPIC %s :%s", c->name, c->topic);
+                               // if the topic text is the same as the current topic,
+                               // dont bother to send the TOPIC command out, just silently
+                               // update the set time and set nick.
+                               if (oldtopic != topic)
+                                       WriteChannelWithServ((char*)source.c_str(), c, "TOPIC %s :%s", c->name, c->topic);
                        }
                        
                }