]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket1.cpp
Merge pull request #1254 from genius3000/insp20+fixPIstatusmsgs
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket1.cpp
index cb2c935482740d3a920c6632692c67f615ce9ee6..c9729cc0f3a6837c96d3d290b1e44c0ad8e9887b 100644 (file)
@@ -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();