if (!Current->GetSocket() || Current->GetSocket()->Introduced())
{
parameterlist params;
- params.push_back(Current->GetName());
+ params.push_back(Current->GetID());
params.push_back(":"+reason);
- Utils->DoOneToAllButSender(Current->GetParent()->GetName(),"SQUIT",params,Current->GetName());
+ Utils->DoOneToAllButSender(Current->GetParent()->GetID(),"SQUIT",params,Current->GetID());
}
if (Current->GetParent() == Utils->TreeRoot)
}
else
{
- ServerInstance->SNO->WriteGlobalSno('L', "Server \002"+Current->GetName()+"\002 split from server \002"+Current->GetParent()->GetName()+"\002 with reason: "+reason);
+ ServerInstance->SNO->WriteToSnoMask('L', "Server \002"+Current->GetName()+"\002 split from server \002"+Current->GetParent()->GetName()+"\002 with reason: "+reason);
}
int num_lost_servers = 0;
int num_lost_users = 0;
Current->Tidy();
Current->GetParent()->DelChild(Current);
Current->cull();
+ const bool ismyroot = (Current == MyRoot);
delete Current;
- if (Current == MyRoot)
+ if (ismyroot)
{
MyRoot = NULL;
Close();