From 4170a17c3caa3807f6bf8021ee86561cd99695b6 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 27 Aug 2007 17:34:57 +0000 Subject: 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 --- src/modules/m_spanningtree/treesocket1.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 &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 &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"); + } + } } } -- cgit v1.2.3