]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/pong.cpp
Fix a bunch of weird indentation and spacing issues.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / pong.cpp
index ce1715874e30007f2de509fb12bf25de79332c39..e88b8cf34b60f7f8158710c74c851257bf030e51 100644 (file)
@@ -1,6 +1,11 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2018 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013-2015 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
  *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
@@ -24,9 +29,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,10 +40,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;
 }
-