]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/pong.cpp
Warn about non-local plaintext server connections.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / pong.cpp
index a7dc64f83b4c2d011ede3a12e0d30a380aed7625..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,7 +29,7 @@
 #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->IsBursting())
        {
@@ -35,9 +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;
 }