]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/netburst.cpp
m_spanningtree Call the OnServerLink hook from TreeServer constructor
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / netburst.cpp
index e42ab5e67fb2fa4fe2bb10b5b41b7f705c4be25c..cdafa9dedfbb86361e8005815f32a1ca11db5ae1 100644 (file)
@@ -108,21 +108,25 @@ void TreeSocket::DoBurst(TreeServer* s)
                capab->auth_challenge ? "challenge-response" : "plaintext password");
        this->CleanNegotiationInfo();
        this->WriteLine(CmdBuilder("BURST").push_int(ServerInstance->Time()));
-       /* Send server tree */
+       // Introduce all servers behind us
        this->SendServers(Utils->TreeRoot, s);
 
        BurstState bs(this);
-       /* Send users and their oper status */
+       // Introduce all users
        this->SendUsers(bs);
 
+       // Sync all channels
        const chan_hash& chans = ServerInstance->GetChans();
        for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ++i)
                SyncChannel(i->second, bs);
 
+       // Send all xlines
        this->SendXLines();
        FOREACH_MOD(OnSyncNetwork, (bs.server));
        this->WriteLine(CmdBuilder("ENDBURST"));
        ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+ s->GetName()+"\2.");
+
+       this->burstsent = true;
 }
 
 void TreeSocket::SendServerInfo(TreeServer* from)
@@ -139,7 +143,6 @@ void TreeSocket::SendServerInfo(TreeServer* from)
  * (and any of ITS servers too) of what servers we know about.
  * If at any point any of these servers already exist on the other
  * end, our connection may be terminated.
- * The hopcount parameter (3rd) is deprecated, and is always 0.
  */
 void TreeSocket::SendServers(TreeServer* Current, TreeServer* s)
 {
@@ -159,10 +162,7 @@ void TreeSocket::SendServers(TreeServer* Current, TreeServer* s)
 }
 
 /** Send one or more FJOINs for a channel of users.
- * If the length of a single line is more than 480-NICKMAX
- * in length, it is split over multiple lines.
- * Send one or more FMODEs for a channel with the
- * channel bans, if there's any.
+ * If the length of a single line is too long, it is split over multiple lines.
  */
 void TreeSocket::SendFJoins(Channel* c)
 {
@@ -241,7 +241,7 @@ void TreeSocket::SendListModes(Channel* chan)
                this->WriteLine(fmode.finalize());
 }
 
-/** Send channel topic, modes and metadata */
+/** Send channel users, topic, modes and global metadata */
 void TreeSocket::SyncChannel(Channel* chan, BurstState& bs)
 {
        SendFJoins(chan);
@@ -270,7 +270,7 @@ void TreeSocket::SyncChannel(Channel* chan)
        SyncChannel(chan, bs);
 }
 
-/** send all users and their oper state/modes */
+/** Send all users and their state, including oper and away status and global metadata */
 void TreeSocket::SendUsers(BurstState& bs)
 {
        ProtocolInterface::Server& piserver = bs.server;