1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 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"
19 extern "C" command_t* init_command(InspIRCd* Instance)
21 return new cmd_pass(Instance);
24 CmdResult cmd_pass::Handle (const char** parameters, int pcnt, userrec *user)
26 // Check to make sure they havnt registered -- Fix by FCS
27 if (user->registered == REG_ALL)
29 user->WriteServ("462 %s :You may not reregister",user->nick);
32 ConnectClass* a = user->GetClass();
36 strlcpy(user->password,parameters[0],63);
37 if (a->GetPass() == parameters[0])
39 user->haspassed = true;