- if (Current->GetParent() == Utils->TreeRoot)
- {
- ServerInstance->SNO->WriteGlobalSno('l', "Server \002"+Current->GetName()+"\002 split: "+reason);
- LocalSquit = true;
- }
- else
- {
- ServerInstance->SNO->WriteGlobalSno('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;
- std::string from = Current->GetParent()->GetName()+" "+Current->GetName();
- SquitServer(from, Current, num_lost_servers, num_lost_users);
- ServerInstance->SNO->WriteToSnoMask(LocalSquit ? 'l' : 'L', "Netsplit complete, lost \002%d\002 user%s on \002%d\002 server%s.",
- num_lost_users, num_lost_users != 1 ? "s" : "", num_lost_servers, num_lost_servers != 1 ? "s" : "");
- Current->Tidy();
- Current->GetParent()->DelChild(Current);
- Current->cull();
- delete Current;
- if (Current == MyRoot)
- {
- MyRoot = NULL;
- Close();
- }
- }
- else
- ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Squit from unknown server");
+ // XXX: Return CMD_FAILURE when servers SQUIT themselves (i.e. :00S SQUIT 00S :Shutting down)
+ // to stop this message from being forwarded.
+ // The squit logic generates a SQUIT message with our sid as the source and sends it to the
+ // remaining servers.
+ return ret;