summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-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");
+ }
+ }
}
}