X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fhandshaketimer.cpp;h=b264a4c2fb242333ddc424f1404c23e54d39f4ec;hb=c440038736f749a56dbac1badee5b2f099286117;hp=1b3b1dd2227ba16176fa6de18d78f167fcdd0480;hpb=192fa7d3138ccb5929dc9af8de3395d6ea25619c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/handshaketimer.cpp b/src/modules/m_spanningtree/handshaketimer.cpp index 1b3b1dd22..b264a4c2f 100644 --- a/src/modules/m_spanningtree/handshaketimer.cpp +++ b/src/modules/m_spanningtree/handshaketimer.cpp @@ -12,8 +12,6 @@ */ #include "inspircd.h" -#include "commands/cmd_whois.h" -#include "commands/cmd_stats.h" #include "socket.h" #include "xline.h" #include "../transport.h" @@ -27,7 +25,8 @@ /* $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, int delay) : Timer(delay, Inst->Time(), true), Instance(Inst), sock(s), lnk(l), Utils(u) +HandshakeTimer::HandshakeTimer(TreeSocket* s, Link* l, SpanningTreeUtilities* u, int delay) + : Timer(delay, ServerInstance->Time(), true), sock(s), lnk(l), Utils(u) { thefd = sock->GetFd(); } @@ -39,16 +38,16 @@ HandshakeTimer::~HandshakeTimer() void HandshakeTimer::Tick(time_t TIME) { - if (!sock->GetHook()) + if (!sock->GetIOHook()) { CancelRepeat(); - sock->SendCapabilities(); + sock->SendCapabilities(1); } - else if (BufferedSocketHSCompleteRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send()) + else if (BufferedSocketHSCompleteRequest(sock, Utils->Creator, sock->GetIOHook()).Send()) { CancelRepeat(); - BufferedSocketAttachCertRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send(); - sock->SendCapabilities(); + BufferedSocketAttachCertRequest(sock, Utils->Creator, sock->GetIOHook()).Send(); + sock->SendCapabilities(1); } // otherwise, try again later }