aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/handshaketimer.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-04-09 14:07:18 +0000
committerGravatar brain2007-04-09 14:07:18 +0000
commitbe36d92f3dcb0ac3772daebff43a5ecfe0a2d364 (patch)
tree4a7e2ff8f2cace119d3b97c5ea791f2462076119 /src/modules/m_spanningtree/handshaketimer.cpp
parentAdd methods needed for storing challenge string (diff)
downloadinspircd++-be36d92f3dcb0ac3772daebff43a5ecfe0a2d364.tar.gz
inspircd++-be36d92f3dcb0ac3772daebff43a5ecfe0a2d364.tar.bz2
inspircd++-be36d92f3dcb0ac3772daebff43a5ecfe0a2d364.zip
Added ability to send and receive a challenge, dont do anything with it yet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6767 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/handshaketimer.cpp')
-rw-r--r--src/modules/m_spanningtree/handshaketimer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/handshaketimer.cpp b/src/modules/m_spanningtree/handshaketimer.cpp
index 32364e278..57a7eeced 100644
--- a/src/modules/m_spanningtree/handshaketimer.cpp
+++ b/src/modules/m_spanningtree/handshaketimer.cpp
@@ -41,18 +41,25 @@ void HandshakeTimer::Tick(time_t TIME)
{
if (Instance->SE->GetRef(thefd) == sock)
{
- if (sock->GetHook() && InspSocketHSCompleteRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send())
+ if (!sock->GetHook())
{
- InspSocketAttachCertRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send();
sock->SendCapabilities();
if (sock->GetLinkState() == CONNECTING)
- {
sock->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+lnk->SendPass+" 0 :"+this->Instance->Config->ServerDesc);
- }
}
else
{
- Instance->Timers->AddTimer(new HandshakeTimer(Instance, sock, lnk, Utils));
+ if (sock->GetHook() && InspSocketHSCompleteRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send())
+ {
+ InspSocketAttachCertRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send();
+ sock->SendCapabilities();
+ if (sock->GetLinkState() == CONNECTING)
+ sock->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+lnk->SendPass+" 0 :"+this->Instance->Config->ServerDesc);
+ }
+ else
+ {
+ Instance->Timers->AddTimer(new HandshakeTimer(Instance, sock, lnk, Utils));
+ }
}
}
}