summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 19:05:26 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 19:05:26 +0000
commit26d10afd166b5ef5a16370f5aa8b1e8ed57ad809 (patch)
tree2a5283b4e2dd3612b7ae6f1b7c97e28a2eab7269 /src/modules
parent5e853ca0556aaf7b9b406e1f28e17eb6b84d2512 (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp22
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