]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
m_spanningtree Do pointer comparison before deleting one of the pointers in TreeSocke...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index 37cd8c9a2366f0d269760e53142911198777a3e9..d702ab4a25c9d93e497a5283c945de4c5dc3cc85 100644 (file)
@@ -38,6 +38,7 @@
 #include "protocolinterface.h"
 
 ModuleSpanningTree::ModuleSpanningTree()
+       : KeepNickTS(false)
 {
        Utils = new SpanningTreeUtilities(this);
        commands = new SpanningTreeCommands(this);
@@ -704,11 +705,12 @@ void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick)
 
                /** IMPORTANT: We don't update the TS if the oldnick is just a case change of the newnick!
                 */
-               if (irc::string(user->nick.c_str()) != assign(oldnick))
+               if ((irc::string(user->nick.c_str()) != assign(oldnick)) && (!this->KeepNickTS))
                        user->age = ServerInstance->Time();
 
                params.push_back(ConvToStr(user->age));
                Utils->DoOneToMany(user->uuid,"NICK",params);
+               this->KeepNickTS = false;
        }
        else if (!loopCall && user->nick == user->uuid)
        {