summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 17:34:57 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 17:34:57 +0000
commit4170a17c3caa3807f6bf8021ee86561cd99695b6 (patch)
tree32983489daf9838dbf2733f4b589023d1392d5f7
parented31c3ee4a7b5f59465457ba353642d46d86a8b2 (diff)
Oops, forgot a branch (the logic here totally sucks, it will need cleaning up. I want to get it working first.)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7899 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 5809fb6b8..e4710b273 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -1012,6 +1012,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
if (age > iter->second->signon) /* It will never be equal here */
{
+ Instance->Log(DEBUG,"*** OUR client is older");
if (bFNCNewer)
{
/* incoming client "lost" - for now, send SVSNICK to them .. XXX use SAVE*/
@@ -1028,6 +1029,25 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
Instance->Log(DEBUG,"*** OUR client lost, changing ours");
}
}
+ else
+ {
+ Instance->Log(DEBUG,"*** OUR client is newer");
+ if (bFNCNewer)
+ {
+ /* our client is newer */
+ iter->second->ForceNickChange(iter->second->uuid);
+ Instance->Log(DEBUG,"*** OUR client lost, changing ours");
+ }
+ else
+ {
+ /* incoming client "lost" - for now, send SVSNICK to them .. XXX use SAVE*/
+ 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();
+ Instance->Log(DEBUG,"*** INCOMING client lost, changed theirs");
+ }
+ }
}
}