]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_pass.cpp
Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a note...
[user/henk/code/inspircd.git] / src / commands / cmd_pass.cpp
index 801d9923b173357226eedc3c9fe671df90e739b8..94a7c6e87ab255d866589baa934cf4bc02c65245 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new CommandPass(Instance);
 }
 
-CmdResult CommandPass::Handle (const char** parameters, int pcnt, User *user)
+CmdResult CommandPass::Handle (const char** parameters, int, User *user)
 {
        // Check to make sure they havnt registered -- Fix by FCS
        if (user->registered == REG_ALL)
@@ -32,7 +32,7 @@ CmdResult CommandPass::Handle (const char** parameters, int pcnt, User *user)
                return CMD_FAILURE;
 
        strlcpy(user->password,parameters[0],63);
-       if (a->GetPass() == parameters[0])
+       if (!ServerInstance->PassCompare(user, a->GetPass().c_str(), parameters[0], a->GetHash().c_str()))
        {
                user->haspassed = true;
        }