X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_pass.cpp;h=b9b55d007aba5a7bdf5e7d96eda6740f862dafda;hb=cf83031f7bf1c037bf726df84f93686b9631531b;hp=2333661e77c072cac7cc8d1cc7b37a0ced488329;hpb=68730d4c9701b34c962302e6410908865fb2ba28;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_pass.cpp b/src/commands/cmd_pass.cpp index 2333661e7..b9b55d007 100644 --- a/src/commands/cmd_pass.cpp +++ b/src/commands/cmd_pass.cpp @@ -19,23 +19,21 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandPass(Instance); } -CmdResult CommandPass::Handle (const char* const* parameters, int, User *user) +CmdResult CommandPass::Handle (const std::vector& parameters, User *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(462, "%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],63); - if (!ServerInstance->PassCompare(user, a->GetPass().c_str(), parameters[0], a->GetHash().c_str())) - { + 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; - } return CMD_SUCCESS; }