]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/numerics.h
Convert more stuff to use numerics.h, change SERVER to send ERR_ALREADYREGISTERED...
[user/henk/code/inspircd.git] / include / numerics.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2008 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 /*
15  * This file is aimed providing a string that is easier to use than using the numeric
16  * directly.
17  *
18  * Thanks to Darom, jackmcbarn and Brain for suggesting and discussing this.
19  *
20  * Please note that the list may not be exhaustive, it'll be done when I have
21  * nothing better to do with my time. -- w00t (jul 13, 2008)
22  */
23
24 enum Numerics
25 {
26         /*
27          * Reply range of numerics.
28          */
29         RPL_WELCOME                                     =       001, // not RFC, extremely common though
30         RPL_YOURHOSTIS                                  =       002, // not RFC, extremely common though
31         RPL_SERVERCREATED                               =       003, // not RFC, extremely common though
32         RPL_SERVERVERSION                               =       004, // not RFC, extremely common though
33         RPL_ISUPPORT                                    =       005, // not RFC, extremely common though
34
35         RPL_SNOMASKIS                                   =       8, // unrealircd - cant put 008 as it will be interpreted as octal
36
37         RPL_YOURUUID                                    =       42, // taken from ircnet - see above
38
39         RPL_UMODEIS                                     =       221,
40         RPL_RULES                                       =       232, // unrealircd
41
42         RPL_RULESTART                                   =       308, // unrealircd
43         RPL_RULESEND                                    =       309, // unrealircd
44         RPL_CHANNELMODEIS                               =       324,
45         RPL_CHANNELCREATED                              =       329, // ???
46         RPL_TOPIC                                       =       332,
47         RPL_TOPICTIME                                   =       333, // not RFC, extremely common though
48         RPL_VERSION                                             =       351,
49         RPL_NAMREPLY                                    =       353,
50         RPL_ENDOFNAMES                                  =       366,
51
52         RPL_MOTD                                        =       372,
53         RPL_MOTDSTART                                   =       375,
54         RPL_ENDOFMOTD                                   =       376,
55
56         RPL_REHASHING                                           =       382,
57         RPL_TIME                                                        =       391,
58         RPL_YOURDISPLAYEDHOST                           =       396, // from charybdis/etc, common convention
59
60         /*
61          * Error range of numerics.
62          */
63         ERR_NOSUCHNICK                                  =       401,
64         ERR_NOSUCHCHANNEL                               =       403, // used to indicate an invalid channel name also, so don't rely on RFC text (don't do that anyway!)
65         ERR_TOOMANYCHANNELS                             =       405,
66         ERR_UNKNOWNCOMMAND                              =       421,
67         ERR_NOMOTD                                      =       422,
68         ERR_NORULES                                     =       434, // unrealircd
69         ERR_USERNOTINCHANNEL                            =       441,
70         ERR_NOTREGISTERED                               =       451,
71         ERR_NEEDMOREPARAMS                              =       461,
72         ERR_ALREADYREGISTERED                   =       462,
73
74         /*
75          * A quick side-rant about the next group of numerics..
76          * There are clients out there that like to assume that just because they don't recieve a numeric
77          * they know, that they have joined the channel.
78          *
79          * If IRC was at all properly standardised, this may even be a semi-acceptable assumption to make,
80          * but that's not the case as we all know, so IT IS NOT ACCEPTABLE. Especially for Insp users, where
81          * differing modules MAY potentially choose to block joins and send NOTICEs or other text to the user
82          * instead!
83          *
84          * tl;dr version:
85          *   DON'T MAKE YOUR CLIENT ASSUME YOU JOINED UNLESS YOU RECIEVE A JOIN WITH YOUR DAMN NICK ON IT.
86          * Thanks.
87          *
88          *  -- A message from the IRC group for coder sanity, and w00t
89          */
90         ERR_BADCHANNELKEY                               =       475,
91         ERR_INVITEONLYCHAN                              =       473,
92         ERR_CHANNELISFULL                               =       471,
93         ERR_BANNEDFROMCHAN                              =       474,
94
95         ERR_NOPRIVILEGES                                =       481, // rfc, beware though, we use this for other things opers may not do also
96         ERR_CHANOPRIVSNEEDED                            =       482, // rfc, beware though, we use this for other things like trying to kick a uline
97
98         ERR_UNKNOWNSNOMASK                              =       501, // insp-specific
99         ERR_USERSDONTMATCH                              =       502,
100
101         ERR_CANTUNLOADMODULE                            =       972, // insp-specific
102         RPL_UNLOADEDMODULE                              =       973, // insp-specific
103         ERR_CANTLOADMODULE                              =       974, // insp-specific
104         RPL_LOADEDMODULE                                =       975 // insp-specific
105 };