diff options
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 3df0bdee8..bfd3db587 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -168,18 +168,8 @@ void TreeSocket::ProcessLine(std::string &line) if (!CheckDuplicate(capab->name, capab->sid)) return; - this->LinkState = CONNECTED; - Utils->timeoutlist.erase(this); + FinishAuth(capab->name, capab->sid, capab->description, capab->hidden); - linkID = capab->name; - - MyRoot = new TreeServer(capab->name, capab->description, capab->sid, Utils->TreeRoot, this, capab->hidden); - Utils->TreeRoot->AddChild(MyRoot); - - MyRoot->bursting = true; - this->DoBurst(MyRoot); - - CommandServer::Builder(MyRoot).Forward(MyRoot); CmdBuilder(MyRoot->GetID(), "BURST").insert(params).Forward(MyRoot); } else if (command == "ERROR") @@ -380,3 +370,19 @@ void TreeSocket::Close() } } } + +void TreeSocket::FinishAuth(const std::string& remotename, const std::string& remotesid, const std::string& remotedesc, bool hidden) +{ + this->LinkState = CONNECTED; + Utils->timeoutlist.erase(this); + + linkID = remotename; + + MyRoot = new TreeServer(remotename, remotedesc, remotesid, Utils->TreeRoot, this, hidden); + Utils->TreeRoot->AddChild(MyRoot); + + this->DoBurst(MyRoot); + + // This will send a * in place of the password/hmac + CommandServer::Builder(MyRoot).Forward(MyRoot); +} |