From 7e0943ed0f790e55c83062402b196af9ecd7d22f Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 5 Dec 2005 13:38:42 +0000 Subject: [PATCH] Modified FTOPIC to not send out the TOPIC command if the topic text is unchanged git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2194 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 23c1a7150..cbf7f5b06 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -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); } } -- 2.39.2