]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/pong.cpp
Merge branch 'insp20' into master.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / pong.cpp
index 6a29163e48c2d5f9e0c378668e621be5cf93237e..718d5f0bb8890af5582b907ce23e40ff9024be97 100644 (file)
@@ -24,9 +24,9 @@
 #include "commands.h"
 #include "utils.h"
 
-CmdResult CommandPong::HandleServer(TreeServer* server, std::vector<std::string>& params)
+CmdResult CommandPong::HandleServer(TreeServer* server, CommandBase::Params& params)
 {
-       if (server->bursting)
+       if (server->IsBursting())
        {
                ServerInstance->SNO->WriteGlobalSno('l', "Server \002%s\002 has not finished burst, forcing end of burst (send ENDBURST!)", server->GetName().c_str());
                server->FinishBurst();
@@ -35,9 +35,7 @@ CmdResult CommandPong::HandleServer(TreeServer* server, std::vector<std::string>
        if (params[0] == ServerInstance->Config->GetSID())
        {
                // PONG for us
-               long ts = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000);
-               server->rtt = ts - server->LastPingMsec;
-               server->SetPingFlag();
+               server->OnPong();
        }
        return CMD_SUCCESS;
 }