From 26d10afd166b5ef5a16370f5aa8b1e8ed57ad809 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 27 Aug 2007 19:05:26 +0000 Subject: Okay. Make it compile too, and make equal TS collision work correctly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7910 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index bb568a2c7..6a092425d 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -1000,8 +1000,8 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa /* fuck. now it gets complex. */ /* first, let's see if ident@host matches. */ - bool SamePerson = strcmp(iter->second->ident, parv[5]) - && !strcmp(iter->second->GetIP(), parv[7]); + bool SamePerson = strcmp(iter->second->ident, params[5].c_str()) + && !strcmp(iter->second->GetIPString(), params[7].c_str()); /* * if ident@ip is equal, and theirs is newer, or @@ -1011,16 +1011,26 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa (!SamePerson && age > iter->second->age)) { /* remote needs to change */ - this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" SVSNICK "+params[0]+" " + params[0]); - /* also, don't trample on the hash - use their UID as nick */ - tempnick = params[0].c_str(); + bChangeLocal = false; } else { /* ours needs to change */ - iter->second->ForceNickChange(iter->second->uuid); + bChangeRemote = false; } } + + + if (bChangeLocal) + { + iter->second->ForceNickChange(iter->second->uuid); + } + if (bChangeRemote) + { + this->WriteLine(std::string(":")+this->Instance->Config->ServerName+" SVSNICK "+params[0]+" " + params[0]); + /* also, don't trample on the hash - use their UID as nick */ + tempnick = params[0].c_str(); + } } /* IMPORTANT NOTE: For remote users, we pass the UUID in the constructor. This automatically -- cgit v1.2.3