]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Oops, forgot a branch (the logic here totally sucks, it will need cleaning up. I...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 27 Aug 2007 17:34:57 +0000 (17:34 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 27 Aug 2007 17:34:57 +0000 (17:34 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7899 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/treesocket1.cpp

index 5809fb6b82c50750738e972ae25eaae63d5b31bc..e4710b273f1c163f02bae468aa3b976d338dea62 100644 (file)
@@ -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");
+                               }
+                       }
                }
        }