]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/save.cpp
Use irc::equals instead of strcasecmp where appropriate.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / save.cpp
index a382b8d66807cf9880a01f8b30b39f7049106c14..f9af52a9fac8d46684e31d76839b5ae3ce9aa1cc 100644 (file)
@@ -1,6 +1,10 @@
 /*
  * 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>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
 /**
  * SAVE command - force nick change to UID on timestamp match
  */
-CmdResult CommandSave::Handle(User* user, std::vector<std::string>& params)
+CmdResult CommandSave::Handle(User* user, Params& params)
 {
        User* u = ServerInstance->FindUUID(params[0]);
-       if ((!u) || (IS_SERVER(u)))
+       if (!u)
                return CMD_FAILURE;
 
-       time_t ts = atol(params[1].c_str());
+       time_t ts = ConvToNum<time_t>(params[1]);
 
        if (u->age == ts)
                u->ChangeNick(u->uuid, SavedTimestamp);