From 5f7df6455a7055ab71dc4ec84be87ad3f151fa76 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 27 Jul 2014 18:25:23 +0200 Subject: m_spanningtree Add newly created TreeServers to the parent's list in the constructor --- src/modules/m_spanningtree/server.cpp | 1 - src/modules/m_spanningtree/treeserver.cpp | 1 + src/modules/m_spanningtree/treesocket2.cpp | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 017b9ddb3..8350547f0 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -65,7 +65,6 @@ CmdResult CommandServer::HandleServer(TreeServer* ParentOfThis, std::vectorGetSocket(), lnk ? lnk->Hidden : false); - ParentOfThis->AddChild(Node); ServerInstance->SNO->WriteToSnoMask('L', "Server \002"+ParentOfThis->GetName()+"\002 introduced server \002"+servername+"\002 ("+description+")"); return CMD_SUCCESS; } diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 74854acc9..057432828 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -113,6 +113,7 @@ TreeServer::TreeServer(const std::string& Name, const std::string& Desc, const s */ this->AddHashEntry(); + Parent->AddChild(this); } const std::string& TreeServer::GetID() diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index bfd3db587..65dd9cc5b 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -379,7 +379,6 @@ void TreeSocket::FinishAuth(const std::string& remotename, const std::string& re linkID = remotename; MyRoot = new TreeServer(remotename, remotedesc, remotesid, Utils->TreeRoot, this, hidden); - Utils->TreeRoot->AddChild(MyRoot); this->DoBurst(MyRoot); -- cgit v1.2.3