]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_die.cpp
Patch to not increment nickchange counter for nick changes that would be blocked...
[user/henk/code/inspircd.git] / src / commands / cmd_die.cpp
index 2723ecca3067969a5406664d602d729bc8b8991c..b85323afc9fb5ebe221e7682c07332974a2ed925 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -22,16 +22,16 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /DIE
  */
-CmdResult CommandDie::Handle (const char* const* parameters, int pcnt, User *user)
+CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *user)
 {
-       if (!ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0], ServerInstance->Config->powerhash))
+       if (!ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0].c_str(), ServerInstance->Config->powerhash))
        {
                {
                        std::string diebuf = std::string("*** DIE command from ") + user->nick + "!" + user->ident + "@" + user->dhost + ". Terminating in " + ConvToStr(ServerInstance->Config->DieDelay) + " seconds.";
                        ServerInstance->Logs->Log("COMMAND",SPARSE, diebuf);
                        ServerInstance->SendError(diebuf);
                }
-               
+
                if (ServerInstance->Config->DieDelay)
                        sleep(ServerInstance->Config->DieDelay);
 
@@ -39,8 +39,8 @@ CmdResult CommandDie::Handle (const char* const* parameters, int pcnt, User *use
        }
        else
        {
-               ServerInstance->Logs->Log("COMMAND",SPARSE, "Failed /DIE command from %s!%s@%s", user->nick, user->ident, user->host);
-               ServerInstance->SNO->WriteToSnoMask('A', "Failed DIE Command from %s!%s@%s.",user->nick,user->ident,user->host);
+               ServerInstance->Logs->Log("COMMAND",SPARSE, "Failed /DIE command from %s!%s@%s", user->nick.c_str(), user->ident.c_str(), user->host.c_str());
+               ServerInstance->SNO->WriteGlobalSno('a', "Failed DIE Command from %s!%s@%s.",user->nick.c_str(),user->ident.c_str(),user->host.c_str());
                return CMD_FAILURE;
        }
        return CMD_SUCCESS;