]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket2.cpp
Add m_showfile, remove cmd_rules
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket2.cpp
index 986e71cfe147027f8b850b3c94bed575e86a810e..b66595bd1541d080d0167d97987fc6f9e9f4f71b 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")
                        {
@@ -312,13 +307,19 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
 
        ServerCommand* scmd = Utils->Creator->CmdManager.GetHandler(command);
        CommandBase* cmdbase = scmd;
-       Command* cmd;
+       Command* cmd = NULL;
        if (!scmd)
        {
                // Not a special server-to-server command
                cmd = ServerInstance->Parser->GetHandler(command);
                if (!cmd)
                {
+                       if (command == "ERROR")
+                       {
+                               this->Error(params);
+                               return;
+                       }
+
                        irc::stringjoiner pmlist(params);
                        ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Unrecognised S2S command :%s %s %s",
                                who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str());