]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket2.cpp
Remove ModuleManager::GetAllModuleNames(), use GetModules() instead
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket2.cpp
index 66826ff3b9e3fa0392e6b766a64b63a9d3fdf5e7..8d14ff5ff07c9de0183b8548ca0c42e621774c00 100644 (file)
@@ -29,6 +29,7 @@
 #include "treeserver.h"
 #include "treesocket.h"
 #include "resolvers.h"
+#include "commands.h"
 
 /* Handle ERROR command */
 void TreeSocket::Error(parameterlist &params)
@@ -178,14 +179,8 @@ void TreeSocket::ProcessLine(std::string &line)
                                MyRoot->bursting = true;
                                this->DoBurst(MyRoot);
 
-                               parameterlist sparams;
-                               sparams.push_back(MyRoot->GetName());
-                               sparams.push_back("*");
-                               sparams.push_back("0");
-                               sparams.push_back(MyRoot->GetID());
-                               sparams.push_back(":" + MyRoot->GetDesc());
-                               Utils->DoOneToAllButSender(ServerInstance->Config->GetSID(), "SERVER", sparams, MyRoot->GetName());
-                               Utils->DoOneToAllButSender(MyRoot->GetID(), "BURST", params, MyRoot->GetName());
+                               CommandServer::Builder(MyRoot).Forward(MyRoot);
+                               CmdBuilder(MyRoot->GetID(), "BURST").insert(params).Forward(MyRoot);
                        }
                        else if (command == "ERROR")
                        {
@@ -388,7 +383,7 @@ void TreeSocket::Close()
                time_t server_uptime = ServerInstance->Time() - this->age;
                if (server_uptime)
                {
-                       std::string timestr = Utils->Creator->TimeToStr(server_uptime);
+                       std::string timestr = ModuleSpanningTree::TimeToStr(server_uptime);
                        ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' was established for %s", linkID.c_str(), timestr.c_str());
                }
        }