X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fping.cpp;h=df4d920735e7286ba67f73b5db783ba0bd2b0c5a;hb=102c54990c8ae10943f4f0ac36b5e80b7b900268;hp=537efe96466488af37948961335f9ae38d6c42ca;hpb=b14ebbccf08ec34a73e1ba271e67da80d9fe805c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/ping.cpp b/src/modules/m_spanningtree/ping.cpp index 537efe964..df4d92073 100644 --- a/src/modules/m_spanningtree/ping.cpp +++ b/src/modules/m_spanningtree/ping.cpp @@ -1,6 +1,11 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2013 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,20 +29,18 @@ #include "commands.h" #include "utils.h" -CmdResult CommandPing::Handle(User* user, std::vector& params) +CmdResult CommandPing::Handle(User* user, Params& params) { if (params[0] == ServerInstance->Config->GetSID()) { // PING for us, reply with a PONG - parameterlist reply; - reply.push_back(user->uuid); + CmdBuilder reply("PONG"); + reply.push(user->uuid); if (params.size() >= 2) // If there is a second parameter, append it - reply.push_back(params[1]); + reply.push(params[1]); - Utils->DoOneToOne(params[0], "PONG", reply, user->server); + reply.Unicast(user); } return CMD_SUCCESS; } - -