#include "resolvers.h"
/* Handle ERROR command */
-bool TreeSocket::Error(parameterlist ¶ms)
+void TreeSocket::Error(parameterlist ¶ms)
{
- if (params.size() < 1)
- return false;
- ServerInstance->SNO->WriteGlobalSno('l',"ERROR from %s: %s",(!InboundServerName.empty() ? InboundServerName.c_str() : myhost.c_str()),params[0].c_str());
- /* we will return false to cause the socket to close. */
- return false;
+ std::string msg = params.size() ? params[0] : "";
+ SetError("received ERROR " + msg);
}
void TreeSocket::Split(const std::string& line, std::string& prefix, std::string& command, parameterlist& params)
this->Squit(Utils->FindServer(params[0]),params[1]);
}
}
- else if (command == "MODENOTICE")
- {
- if (params.size() >= 2)
- {
- ServerInstance->Users->WriteMode(params[0].c_str(), WM_AND, "*** From %s: %s",
- who->nick.c_str(), params[1].c_str());
- }
- Utils->DoOneToAllButSender(prefix, command, params, prefix);
- }
else if (command == "SNONOTICE")
{
if (params.size() >= 2)
else if (command == "BURST")
{
// Set prefix server as bursting
- if (!IS_SERVER(who))
+ TreeServer* ServerSource = Utils->FindServer(prefix);
+ if (!ServerSource)
{
ServerInstance->SNO->WriteGlobalSno('l', "WTF: Got BURST from a non-server(?): %s", prefix.c_str());
return;
}
- route_back_again->bursting = true;
+ ServerSource->bursting = true;
Utils->DoOneToAllButSender(prefix, command, params, prefix);
}
else if (command == "ENDBURST")