]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_pass.cpp
Braunvieh!
[user/henk/code/inspircd.git] / src / commands / cmd_pass.cpp
index 2e1a702a2f4ab9eef2c344ccec1716f4ac194576..300479df31848cde604583f75c004dab45802000 100644 (file)
@@ -24,14 +24,14 @@ CmdResult CommandPass::Handle (const std::vector<std::string>& parameters, User
        // Check to make sure they havnt registered -- Fix by FCS
        if (user->registered == REG_ALL)
        {
-               user->WriteNumeric(462, "%s :You may not reregister",user->nick);
+               user->WriteNumeric(ERR_ALREADYREGISTERED, "%s :You may not reregister",user->nick.c_str());
                return CMD_FAILURE;
        }
        ConnectClass* a = user->GetClass();
        if (!a)
                return CMD_FAILURE;
 
-       strlcpy(user->password, parameters[0].c_str(), 63);
+       user->password.assign(parameters[0], 0, 63);
        if (!ServerInstance->PassCompare(user, a->GetPass().c_str(), parameters[0].c_str(), a->GetHash().c_str()))
                user->haspassed = true;