]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/netburst.cpp
Remove current time parameter of the Timer constructor
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / netburst.cpp
index 2703ad0f049b27d461785fe394886a3a9227777e..f96e47d6053ea0722f12d56798cb2ea7467cbd8a 100644 (file)
@@ -107,9 +107,7 @@ void TreeSocket::DoBurst(TreeServer* s)
                capab->auth_fingerprint ? "SSL Fingerprint and " : "",
                capab->auth_challenge ? "challenge-response" : "plaintext password");
        this->CleanNegotiationInfo();
-       this->WriteLine(":" + ServerInstance->Config->GetSID() + " BURST " + ConvToStr(ServerInstance->Time()));
-       /* send our version string */
-       this->WriteLine(":" + ServerInstance->Config->GetSID() + " VERSION :"+ServerInstance->GetVersionString());
+       this->WriteLine(CmdBuilder("BURST").push_int(ServerInstance->Time()));
        /* Send server tree */
        this->SendServers(Utils->TreeRoot, s);
 
@@ -123,10 +121,19 @@ void TreeSocket::DoBurst(TreeServer* s)
 
        this->SendXLines();
        FOREACH_MOD(OnSyncNetwork, (bs.server));
-       this->WriteLine(":" + ServerInstance->Config->GetSID() + " ENDBURST");
+       this->WriteLine(CmdBuilder("ENDBURST"));
        ServerInstance->SNO->WriteToSnoMask('l',"Finished bursting to \2"+ s->GetName()+"\2.");
 }
 
+void TreeSocket::SendServerInfo(TreeServer* from)
+{
+       // Send public version string
+       this->WriteLine(CommandSInfo::Builder(from, "version", from->GetVersion()));
+
+       // Send full version string that contains more information and is shown to opers
+       this->WriteLine(CommandSInfo::Builder(from, "fullversion", from->GetFullVersion()));
+}
+
 /** Recursively send the server tree.
  * This is used during network burst to inform the other server
  * (and any of ITS servers too) of what servers we know about.
@@ -136,6 +143,8 @@ void TreeSocket::DoBurst(TreeServer* s)
  */
 void TreeSocket::SendServers(TreeServer* Current, TreeServer* s)
 {
+       SendServerInfo(Current);
+
        const TreeServer::ChildServers& children = Current->GetChildren();
        for (TreeServer::ChildServers::const_iterator i = children.begin(); i != children.end(); ++i)
        {
@@ -143,7 +152,6 @@ void TreeSocket::SendServers(TreeServer* Current, TreeServer* s)
                if (recursive_server != s)
                {
                        this->WriteLine(CommandServer::Builder(recursive_server));
-                       this->WriteLine(":" + recursive_server->GetID() + " VERSION :" + recursive_server->GetVersion());
                        /* down to next level */
                        this->SendServers(recursive_server, s);
                }