]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/commands/cmd_nick.h
Update copyrights for 2009.
[user/henk/code/inspircd.git] / include / commands / cmd_nick.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *      the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __CMD_NICK_H__
15 #define __CMD_NICK_H__
16
17 // include the common header files
18
19 #include "users.h"
20 #include "channels.h"
21
22 /** Handle /NICK. These command handlers can be reloaded by the core,
23  * and handle basic RFC1459 commands. Commands within modules work
24  * the same way, however, they can be fully unloaded, where these
25  * may not.
26  */
27 class CommandNick : public Command
28 {
29         bool allowinvalid;
30  public:
31         /** Constructor for nick.
32          */
33         CommandNick (InspIRCd* Instance) : Command(Instance,"NICK", 0, 1, true, 3), allowinvalid(false) { syntax = "<newnick>"; }
34         /** Handle command.
35          * @param parameters The parameters to the comamnd
36          * @param pcnt The number of parameters passed to teh command
37          * @param user The user issuing the command
38          * @return A value from CmdResult to indicate command success or failure.
39          */
40         CmdResult Handle(const std::vector<std::string>& parameters, User *user);
41
42         /** Handle internal command
43          * @param id Used to indicate if invalid nick changes are allowed.
44          * Set to 1 to allow invalid nicks and 0 to deny them.
45          * @param parameters Currently unused
46          */
47         CmdResult HandleInternal(const unsigned int id, const std::deque<classbase*> &parameters);
48 };
49
50 #endif