X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fsvsnick.cpp;h=e9292f445a9a89e4ff38c9b0312e13b1d55dcd90;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=84cf8558cef2a3ef31fb51239106cec3515f0633;hpb=4aed5846f17b15939aaf620ee4c4ca95a10609fc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp index 84cf8558c..e9292f445 100644 --- a/src/modules/m_spanningtree/svsnick.cpp +++ b/src/modules/m_spanningtree/svsnick.cpp @@ -1,7 +1,11 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2010 Daniel De Graaf + * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2013-2016 Attila Molnar + * Copyright (C) 2012 Robby + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2008 Robin Burchell * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -23,7 +27,7 @@ #include "main.h" #include "commands.h" -CmdResult CommandSVSNick::Handle(User* user, std::vector& parameters) +CmdResult CommandSVSNick::Handle(User* user, Params& parameters) { User* u = ServerInstance->FindNick(parameters[0]); @@ -41,13 +45,13 @@ CmdResult CommandSVSNick::Handle(User* user, std::vector& parameter // 4. SVSNICK arrives // 5. Attila_ gets his nick changed to Guest12345 unnecessarily // - // In this case when the SVSNICK is processed the target has already changed his nick to something + // In this case when the SVSNICK is processed the target has already changed their nick to something // which isn't protected, so changing the nick again to a Guest nick is not desired. // However, if the expected nick TS parameter is present in the SVSNICK then the nick change in step 5 // won't happen because the timestamps won't match. if (parameters.size() > 3) { - time_t ExpectedTS = ConvToInt(parameters[3]); + time_t ExpectedTS = ConvToNum(parameters[3]); if (u->age != ExpectedTS) return CMD_FAILURE; // Ignore SVSNICK } @@ -56,7 +60,7 @@ CmdResult CommandSVSNick::Handle(User* user, std::vector& parameter if (isdigit(nick[0])) nick = u->uuid; - time_t NickTS = ConvToInt(parameters[2]); + time_t NickTS = ConvToNum(parameters[2]); if (NickTS <= 0) return CMD_FAILURE; @@ -70,7 +74,7 @@ CmdResult CommandSVSNick::Handle(User* user, std::vector& parameter return CMD_SUCCESS; } -RouteDescriptor CommandSVSNick::GetRouting(User* user, const std::vector& parameters) +RouteDescriptor CommandSVSNick::GetRouting(User* user, const Params& parameters) { return ROUTE_OPT_UCAST(parameters[0]); }