]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket1.cpp
Update wiki links to use HTTPS and point to the correct pages.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket1.cpp
index 6582ba0606d599ab18e2e30aafdd16342c861630..c9729cc0f3a6837c96d3d290b1e44c0ad8e9887b 100644 (file)
@@ -189,9 +189,9 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
                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)
@@ -201,7 +201,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
                }
                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;
@@ -212,8 +212,9 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
                Current->Tidy();
                Current->GetParent()->DelChild(Current);
                Current->cull();
+               const bool ismyroot = (Current == MyRoot);
                delete Current;
-               if (Current == MyRoot)
+               if (ismyroot)
                {
                        MyRoot = NULL;
                        Close();