diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
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") { |