X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fpong.cpp;h=e88b8cf34b60f7f8158710c74c851257bf030e51;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=6a29163e48c2d5f9e0c378668e621be5cf93237e;hpb=f62654a6859998f9d63eb22702c572d5ebcff15c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/pong.cpp b/src/modules/m_spanningtree/pong.cpp index 6a29163e4..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,9 +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; }