1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
18 #include "commands/cmd_pass.h"
20 void cmd_pass::Handle (const char** parameters, int pcnt, userrec *user)
22 // Check to make sure they havnt registered -- Fix by FCS
23 if (user->registered == REG_ALL)
25 user->WriteServ("462 %s :You may not reregister",user->nick);
28 ConnectClass a = user->GetClass();
29 strlcpy(user->password,parameters[0],63);
30 if (!strcmp(parameters[0],a.pass.c_str()))
32 user->haspassed = true;