this->SendError("Protocol error - Introduced remote server from unknown server "+prefix);
return false;
}
- if (!ServerInstance->IsSID(sid))
+ if (!InspIRCd::IsSID(sid))
{
this->SendError("Invalid format server ID: "+sid+"!");
return false;
std::string password = params[1];
std::string sid = params[3];
std::string description = params[4];
- int hops = atoi(params[2].c_str());
+ int hops = ConvToInt(params[2]);
this->SendCapabilities(2);
std::string password = params[1];
std::string sid = params[3];
std::string description = params[4];
- int hops = atoi(params[2].c_str());
+ int hops = ConvToInt(params[2]);
this->SendCapabilities(2);
}
/* Check for fully initialized instances of the server by id */
- ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Looking for dupe SID %s", sid.c_str());
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"Looking for dupe SID %s", sid.c_str());
CheckDupe = Utils->FindServerID(sid);
if (CheckDupe)
// this is good. Send our details: Our server name and description and hopcount of 0,
// along with the sendpass from this block.
this->SendCapabilities(2);
- this->WriteLine(std::string("SERVER ")+ServerInstance->Config->ServerName+" "+this->MakePass(x->SendPass, this->GetTheirChallenge())+" 0 "+ServerInstance->Config->GetSID()+" :"+ServerInstance->Config->ServerDesc);
+ this->WriteLine("SERVER "+ServerInstance->Config->ServerName+" "+this->MakePass(x->SendPass, this->GetTheirChallenge())+" 0 "+ServerInstance->Config->GetSID()+" :"+ServerInstance->Config->ServerDesc);
// move to the next state, we are now waiting for THEM.
MyRoot = new TreeServer(Utils, sname, description, sid, Utils->TreeRoot, this, x->Hidden);
Utils->TreeRoot->AddChild(MyRoot);