X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fhandshaketimer.cpp;h=66adf33e671d6b4befbb3b522c5a5e85ac2a4b53;hb=715074dd10079a3ed846e8815290ba0d13cd4bd8;hp=652390750f5d65c00d6679a028624641397b9faa;hpb=a22c47d19a9388c051dd96d711a0e4a4ef8a8b81;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/handshaketimer.cpp b/src/modules/m_spanningtree/handshaketimer.cpp index 652390750..66adf33e6 100644 --- a/src/modules/m_spanningtree/handshaketimer.cpp +++ b/src/modules/m_spanningtree/handshaketimer.cpp @@ -32,7 +32,7 @@ /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ -HandshakeTimer::HandshakeTimer(InspIRCd* Inst, TreeSocket* s, Link* l, SpanningTreeUtilities* u) : InspTimer(1, time(NULL)), Instance(Inst), sock(s), lnk(l), Utils(u) +HandshakeTimer::HandshakeTimer(InspIRCd* Inst, TreeSocket* s, Link* l, SpanningTreeUtilities* u, int delay) : InspTimer(delay, time(NULL)), Instance(Inst), sock(s), lnk(l), Utils(u) { thefd = sock->GetFd(); } @@ -44,8 +44,6 @@ void HandshakeTimer::Tick(time_t TIME) if (!sock->GetHook()) { sock->SendCapabilities(); - if (sock->GetLinkState() == CONNECTING) - sock->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+sock->MakePass(lnk->SendPass, sock->GetTheirChallenge())+" 0 :"+this->Instance->Config->ServerDesc); } else { @@ -53,12 +51,10 @@ void HandshakeTimer::Tick(time_t TIME) { InspSocketAttachCertRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send(); sock->SendCapabilities(); - if ((sock->GetLinkState() == CONNECTING) && (sock->GetOurChallenge().empty())) - sock->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+sock->MakePass(lnk->SendPass, sock->GetTheirChallenge())+" 0 :"+this->Instance->Config->ServerDesc); } else { - Instance->Timers->AddTimer(new HandshakeTimer(Instance, sock, lnk, Utils)); + Instance->Timers->AddTimer(new HandshakeTimer(Instance, sock, lnk, Utils, 1)); } } }