#include "treeserver.h"
#include "treesocket.h"
#include "resolvers.h"
+#include "commands.h"
/* Handle ERROR command */
void TreeSocket::Error(parameterlist ¶ms)
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")
{
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());
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());
}
}