summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 13:26:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 13:26:40 +0000
commit5e0186d2c865ed122fae3992c7383af2ff77b5c7 (patch)
tree3043d59a621646dc4ca2812c02d9f6a9c689900a /src
parent9442787cbf82cbbe7b1a752b70be0646c673c1e4 (diff)
Changed some synching stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2136 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp20
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")
{