diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 22 |
1 files 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<std::string> &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<std::string> &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 |