summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-27 18:25:23 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-27 18:25:23 +0200
commit5f7df6455a7055ab71dc4ec84be87ad3f151fa76 (patch)
tree7efb082982669e437fbc138a3dd4a56f9e5ca657
parentdb74ec5d64480cce9fb8aab1875ef9ff6643ac43 (diff)
m_spanningtree Add newly created TreeServers to the parent's list in the constructor
-rw-r--r--src/modules/m_spanningtree/server.cpp1
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp1
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp1
3 files changed, 1 insertions, 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::vector<std:
TreeServer* Node = new TreeServer(servername, description, sid, ParentOfThis, ParentOfThis->GetSocket(), 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);