From 5e0186d2c865ed122fae3992c7383af2ff77b5c7 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Dec 2005 13:26:40 +0000 Subject: Changed some synching stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2136 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 069ad53db..fa5a0479f 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -689,6 +689,12 @@ class TreeSocket : public InspSocket // temporarily (until end of burst) we auto-replace occurances of the old nick with the new nick AddFJoinReplacement(tempnick,nick); } + else + { + // the other end will be changing our nick to the guest nick. + // Pause and wait for their FNICK. + SyncPaused = true; + } } clientlist[tempnick] = new userrec(); @@ -790,7 +796,7 @@ class TreeSocket : public InspSocket this->SendServers(TreeRoot,s,1); // Send users and their channels this->SendUsers(s); - // TODO: Send everything else (channel modes etc) + this->WriteLine("ENDUSERS"); this->SendChannelModes(s); this->WriteLine("ENDBURST"); } @@ -872,6 +878,7 @@ class TreeSocket : public InspSocket Srv->ChangeUserNick(u,newnick); DoOneToAllButSender(prefix,"FNICK",params,prefix); } + SyncPaused = false; return true; } @@ -964,6 +971,8 @@ class TreeSocket : public InspSocket params[3] = ":" + params[3]; DoOneToAllButSender(TreeRoot->GetName(),"SERVER",params,servername); this->DoBurst(Node); + this->SendChannelModes(s); + this->WriteLine("ENDBURST"); return true; } } @@ -1121,7 +1130,14 @@ class TreeSocket : public InspSocket params.push_back("1"); params.push_back(":"+InboundDescription); DoOneToAllButSender(TreeRoot->GetName(),"SERVER",params,InboundServerName); - this->DoBurst(Node); + } + else if (command == "ENDUSERS") + { + // one server must wait till the other servers list of synched users + // before starting, so we have time to resolve collisions + this->DoBurst(Node); + this->SendChannelModes(s); + this->WriteLine("ENDBURST"); } else if (command == "ERROR") { -- cgit v1.2.3