1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
15 #include "commands/cmd_pass.h"
17 extern "C" DllExport Command* init_command(InspIRCd* Instance)
19 return new CommandPass(Instance);
22 CmdResult CommandPass::Handle (const char** parameters, int, User *user)
24 // Check to make sure they havnt registered -- Fix by FCS
25 if (user->registered == REG_ALL)
27 user->WriteServ("462 %s :You may not reregister",user->nick);
30 ConnectClass* a = user->GetClass();
34 strlcpy(user->password,parameters[0],63);
35 if (!ServerInstance->PassCompare(user, a->GetPass().c_str(), parameters[0], a->GetHash().c_str()))
37 user->haspassed = true;