X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fpong.cpp;h=e88b8cf34b60f7f8158710c74c851257bf030e51;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=ce1715874e30007f2de509fb12bf25de79332c39;hpb=e244cb2c63b1ac1d85bdbb4691f7b1bd940ae804;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/pong.cpp b/src/modules/m_spanningtree/pong.cpp index ce1715874..e88b8cf34 100644 --- a/src/modules/m_spanningtree/pong.cpp +++ b/src/modules/m_spanningtree/pong.cpp @@ -1,6 +1,11 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2018 Sadie Powell + * Copyright (C) 2013-2015 Attila Molnar + * Copyright (C) 2012 Robby + * Copyright (C) 2010 Craig Edwards + * Copyright (C) 2009 Daniel De Graaf * Copyright (C) 2008 Robin Burchell * * 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& 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 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; } -