]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_pass.cpp
Stripcolor not finished yet.
[user/henk/code/inspircd.git] / src / cmd_pass.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16
17 #include "users.h"
18 #include "commands.h"
19 #include "helperfuncs.h"
20 #include "commands/cmd_pass.h"
21
22 void cmd_pass::Handle (char **parameters, int pcnt, userrec *user)
23 {
24         // Check to make sure they havnt registered -- Fix by FCS
25         if (user->registered == 7)
26         {
27                 WriteServ(user->fd,"462 %s :You may not reregister",user->nick);
28                 return;
29         }
30         ConnectClass a = GetClass(user);
31         strlcpy(user->password,parameters[0],63);
32         if (!strcmp(parameters[0],a.pass.c_str()))
33         {
34                 user->haspassed = true;
35         }
36 }