diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-05 13:38:42 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-05 13:38:42 +0000 |
commit | 7e0943ed0f790e55c83062402b196af9ecd7d22f (patch) | |
tree | 12755a1bb3c8b2dd789c8060aa45d5c8a448ee05 /src/modules | |
parent | ab90b4872444191645b54fc0bb13b59b2c08af34 (diff) |
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
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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); } } |