- Event rmode((char*)Current->GetName().c_str(), (Module*)Utils->Creator, "lost_server");
- rmode.Send(Instance);
-
- std::deque<std::string> params;
- params.push_back(Current->GetName());
- params.push_back(":"+reason);
- Utils->DoOneToAllButSender(Current->GetParent()->GetName(),"SQUIT",params,Current->GetName());
- if (Current->GetParent() == Utils->TreeRoot)
- {
- this->Instance->SNO->WriteToSnoMask('l',"Server \002"+Current->GetName()+"\002 split: "+reason);
- }
- else
- {
- this->Instance->SNO->WriteToSnoMask('l',"Server \002"+Current->GetName()+"\002 split from server \002"+Current->GetParent()->GetName()+"\002 with reason: "+reason);
- }
- num_lost_servers = 0;
- num_lost_users = 0;
- std::string from = Current->GetParent()->GetName()+" "+Current->GetName();
- SquitServer(from, Current);
- Current->Tidy();
- Current->GetParent()->DelChild(Current);
- delete Current;
- this->Instance->SNO->WriteToSnoMask('l',"Netsplit complete, lost \002%d\002 users on \002%d\002 servers.", num_lost_users, num_lost_servers);