]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/numerics.h
Lots, lots more numerics.h conversion
[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                                     =       1, // not RFC, extremely common though
30         RPL_YOURHOSTIS                                  =       2, // not RFC, extremely common though
31         RPL_SERVERCREATED                               =       3, // not RFC, extremely common though
32         RPL_SERVERVERSION                               =       4, // not RFC, extremely common though
33         RPL_ISUPPORT                                    =       5, // not RFC, extremely common though
34
35         RPL_MAP                                                         =       6, // unrealircd
36         RPL_ENDMAP                                                      =       7, // unrealircd
37         RPL_SNOMASKIS                                   =       8, // unrealircd
38
39         RPL_YOURUUID                                    =       42, // taken from ircnet
40
41         RPL_UMODEIS                                     =       221,
42         RPL_RULES                                       =       232, // unrealircd
43         RPL_MAPUSERS                            =       270, // insp-specific(?)
44
45         RPL_RULESTART                                   =       308, // unrealircd
46         RPL_RULESEND                                    =       309, // unrealircd
47         RPL_CHANNELMODEIS                               =       324,
48         RPL_CHANNELCREATED                              =       329, // ???
49         RPL_TOPIC                                       =       332,
50         RPL_TOPICTIME                                   =       333, // not RFC, extremely common though
51         RPL_VERSION                                             =       351,
52         RPL_NAMREPLY                                    =       353,
53         RPL_ENDOFNAMES                                  =       366,
54
55         RPL_MOTD                                        =       372,
56         RPL_MOTDSTART                                   =       375,
57         RPL_ENDOFMOTD                                   =       376,
58
59         RPL_YOUAREOPER                                          =       381,
60         RPL_REHASHING                                           =       382,
61         RPL_TIME                                                        =       391,
62         RPL_YOURDISPLAYEDHOST                           =       396, // from charybdis/etc, common convention
63
64         /*
65          * Error range of numerics.
66          */
67         ERR_NOSUCHNICK                                  =       401,
68         ERR_NOSUCHSERVER                                =       402,
69         ERR_NOSUCHCHANNEL                               =       403, // used to indicate an invalid channel name also, so don't rely on RFC text (don't do that anyway!)
70         ERR_CANNOTSENDTOCHAN                    =       404,
71         ERR_TOOMANYCHANNELS                             =       405,
72         ERR_INVALIDCAPSUBCOMMAND                =       410, // ratbox/charybdis(?)
73         ERR_UNKNOWNCOMMAND                              =       421,
74         ERR_NOMOTD                                      =       422,
75         ERR_NORULES                                     =       434, // unrealircd
76         ERR_USERNOTINCHANNEL                            =       441,
77         ERR_CANTCHANGENICK                                      =       447, // unrealircd, probably
78         ERR_NOTREGISTERED                               =       451,
79         ERR_NEEDMOREPARAMS                              =       461,
80         ERR_ALREADYREGISTERED                   =       462,
81
82         /*
83          * A quick side-rant about the next group of numerics..
84          * There are clients out there that like to assume that just because they don't recieve a numeric
85          * they know, that they have joined the channel.
86          *
87          * If IRC was at all properly standardised, this may even be a semi-acceptable assumption to make,
88          * but that's not the case as we all know, so IT IS NOT ACCEPTABLE. Especially for Insp users, where
89          * differing modules MAY potentially choose to block joins and send NOTICEs or other text to the user
90          * instead!
91          *
92          * tl;dr version:
93          *   DON'T MAKE YOUR CLIENT ASSUME YOU JOINED UNLESS YOU RECIEVE A JOIN WITH YOUR DAMN NICK ON IT.
94          * Thanks.
95          *
96          *  -- A message from the IRC group for coder sanity, and w00t
97          */
98         ERR_BADCHANNELKEY                               =       475,
99         ERR_INVITEONLYCHAN                              =       473,
100         ERR_CHANNELISFULL                               =       471,
101         ERR_BANNEDFROMCHAN                              =       474,
102
103         ERR_NOPRIVILEGES                                =       481, // rfc, beware though, we use this for other things opers may not do also
104         ERR_CHANOPRIVSNEEDED                            =       482, // rfc, beware though, we use this for other things like trying to kick a uline
105
106         ERR_ALLMUSTSSL                                  =       490, // unrealircd      
107         ERR_NOCTCPALLOWED                               =       492, // XXX: bzzzz. 1459 defines this as ERR_NOSERVICEHOST, research it more and perhaps change this! (ERR_CANNOTSENDTOCHAN?)
108                                                                                         // wtf, we also use this for m_noinvite. UGLY!
109         ERR_DELAYREJOIN                                 =       495, // insp-specific, XXX: we should use 'resource temporarily unavailable' from ircnet/ratbox or whatever
110         ERR_UNKNOWNSNOMASK                              =       501, // insp-specific
111         ERR_USERSDONTMATCH                              =       502,
112         ERR_CANTJOINOPERSONLY                   =       520, // unrealircd, but crap to have so many numerics for cant join..
113         ERR_CANTSENDTOUSER                              =       531, // ???
114
115         ERR_WORDFILTERED                                        =       936, // insp-specific, would be nice if we could get rid of this..
116         ERR_CANTUNLOADMODULE                            =       972, // insp-specific
117         RPL_UNLOADEDMODULE                              =       973, // insp-specific
118         ERR_CANTLOADMODULE                              =       974, // insp-specific
119         RPL_LOADEDMODULE                                =       975 // insp-specific
120 };