summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treesocket1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index fdf88f071..8ccd83b3a 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -121,6 +121,15 @@ void TreeSocket::SetTheirChallenge(const std::string &c)
this->theirchallenge = c;
}
+std::string TreeSocket::MakePass(const std::string &password)
+{
+ if ((this->GetOurChallenge() != "") && (this->GetTheirChallenge() != ""))
+ {
+ return password + ":" + this->GetTheirChallenge();
+ }
+ return password;
+}
+
/** When an outbound connection finishes connecting, we receive
* this event, and must send our SERVER string to the other
* side. If the other side is happy, as outlined in the server
@@ -145,10 +154,7 @@ bool TreeSocket::OnConnected()
else
this->SendCapabilities();
/* found who we're supposed to be connecting to, send the neccessary gubbins. */
- /*if (Hook)*/
- Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(*x), this->Utils));
- /*else
- this->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+x->SendPass+" 0 :"+this->Instance->Config->ServerDesc);*/
+ Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(*x), this->Utils));
return true;
}
}