]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/numerics.h
...because every now and again, i have to do a massive commit.
[user/henk/code/inspircd.git] / include / numerics.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
6  * See: http://wiki.inspircd.org/Credits
7  *
8  * This program is free but copyrighted software; see
9  *          the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __NUMERICS_H
15 #define __NUMERICS_H
16
17 /*
18  * This file is aimed providing a string that is easier to use than using the numeric
19  * directly.
20  *
21  * Module authors, please note!
22  *  While you are free to use any numerics on this list, like the rest of the core, you
23  *  *should not* be editing it!
24  *  You should just WriteNumeric(444, .. or whatever as you would before this file, OR:
25  *  #define RPL_MYNUMERIC 444 & WriteNumeric(RPL_MYNUMERIC, ...
26  *
27  *  If you *do* have a suggestion for a numeric you genuinely believe would be useful,
28  *  please speak to us. :)
29  *
30  * Thanks to Darom, jackmcbarn and Brain for suggesting and discussing this.
31  *
32  * Please note that the list may not be exhaustive, it'll be done when I have
33  * nothing better to do with my time. -- w00t (jul 13, 2008)
34  */
35 enum Numerics
36 {
37         /*
38          * Reply range of numerics.
39          */
40         RPL_WELCOME                                     =       1, // 2812, not 1459
41         RPL_YOURHOSTIS                                  =       2, // 2812, not 1459
42         RPL_SERVERCREATED                               =       3, // 2812, not 1459
43         RPL_SERVERVERSION                               =       4, // 2812, not 1459
44         RPL_ISUPPORT                                    =       5, // not RFC, extremely common though (defined as RPL_BOUNCE in 2812, widely ignored)
45
46         RPL_MAP                                                         =       6, // unrealircd
47         RPL_ENDMAP                                                      =       7, // unrealircd
48         RPL_SNOMASKIS                                   =       8, // unrealircd
49
50         RPL_YOURUUID                                    =       42, // taken from ircnet
51
52         RPL_UMODEIS                                     =       221,
53         RPL_RULES                                       =       232, // unrealircd
54         RPL_ADMINME                                     =       256,
55         RPL_ADMINLOC1                           =       257,
56         RPL_ADMINLOC2                           =       258,
57         RPL_ADMINEMAIL                          =       259,
58         RPL_MAPUSERS                            =       270, // insp-specific
59
60         RPL_SYNTAX                                      =       304,    // insp-specific
61
62         RPL_UNAWAY                                              =       305,
63         RPL_NOWAWAY                                             =       306,
64
65         RPL_RULESTART                                   =       308, // unrealircd
66         RPL_RULESEND                                    =       309, // unrealircd
67         RPL_CHANNELMODEIS                               =       324,
68         RPL_CHANNELCREATED                              =       329, // ???
69         RPL_NOTOPICSET                                  =       331,
70         RPL_TOPIC                                       =       332,
71         RPL_TOPICTIME                                   =       333, // not RFC, extremely common though
72
73         RPL_INVITING                                    =       341,
74         RPL_INVITELIST                                  =       346, // insp-specific (stolen from ircu)
75         RPL_ENDOFINVITELIST                             =       347, // insp-specific (stolen from ircu)
76         RPL_VERSION                                             =       351,
77         RPL_NAMREPLY                                    =       353,
78         RPL_ENDOFNAMES                                  =       366,
79
80         RPL_INFO                                        =       371,
81         RPL_ENDOFINFO                           =       374,
82         RPL_MOTD                                        =       372,
83         RPL_MOTDSTART                                   =       375,
84         RPL_ENDOFMOTD                                   =       376,
85
86         RPL_YOUAREOPER                                          =       381,
87         RPL_REHASHING                                           =       382,
88         RPL_TIME                                                        =       391,
89         RPL_YOURDISPLAYEDHOST                           =       396, // from charybdis/etc, common convention
90
91         /*
92          * Error range of numerics.
93          */
94         ERR_NOSUCHNICK                                  =       401,
95         ERR_NOSUCHSERVER                                =       402,
96         ERR_NOSUCHCHANNEL                               =       403, // used to indicate an invalid channel name also, so don't rely on RFC text (don't do that anyway!)
97         ERR_CANNOTSENDTOCHAN                    =       404,
98         ERR_TOOMANYCHANNELS                             =       405,
99         ERR_INVALIDCAPSUBCOMMAND                =       410, // ratbox/charybdis(?)
100         ERR_UNKNOWNCOMMAND                              =       421,
101         ERR_NOMOTD                                      =       422,
102         ERR_NORULES                                     =       434, // unrealircd
103         ERR_USERNOTINCHANNEL                            =       441,
104         ERR_NOTONCHANNEL                                        =       442,
105         ERR_USERONCHANNEL                                       =       443,
106         ERR_CANTCHANGENICK                                      =       447, // unrealircd, probably
107         ERR_NOTREGISTERED                               =       451,
108         ERR_NEEDMOREPARAMS                              =       461,
109         ERR_ALREADYREGISTERED                   =       462,
110
111         /*
112          * A quick side-rant about the next group of numerics..
113          * There are clients out there that like to assume that just because they don't recieve a numeric
114          * they know, that they have joined the channel.
115          *
116          * If IRC was at all properly standardised, this may even be a semi-acceptable assumption to make,
117          * but that's not the case as we all know, so IT IS NOT ACCEPTABLE. Especially for Insp users, where
118          * differing modules MAY potentially choose to block joins and send NOTICEs or other text to the user
119          * instead!
120          *
121          * tl;dr version:
122          *   DON'T MAKE YOUR CLIENT ASSUME YOU JOINED UNLESS YOU RECIEVE A JOIN WITH YOUR DAMN NICK ON IT.
123          * Thanks.
124          *
125          *  -- A message from the IRC group for coder sanity, and w00t
126          */
127         ERR_BADCHANNELKEY                               =       475,
128         ERR_INVITEONLYCHAN                              =       473,
129         ERR_CHANNELISFULL                               =       471,
130         ERR_BANNEDFROMCHAN                              =       474,
131
132         ERR_NOPRIVILEGES                                =       481, // rfc, beware though, we use this for other things opers may not do also
133         ERR_CHANOPRIVSNEEDED                            =       482, // rfc, beware though, we use this for other things like trying to kick a uline
134
135         ERR_ALLMUSTSSL                                  =       490, // unrealircd
136         ERR_NOCTCPALLOWED                               =       492, // XXX: bzzzz. 1459 defines this as ERR_NOSERVICEHOST, research it more and perhaps change this! (ERR_CANNOTSENDTOCHAN?)
137                                                                                         // wtf, we also use this for m_noinvite. UGLY!
138         ERR_DELAYREJOIN                                 =       495, // insp-specific, XXX: we should use 'resource temporarily unavailable' from ircnet/ratbox or whatever
139         ERR_UNKNOWNSNOMASK                              =       501, // insp-specific
140         ERR_USERSDONTMATCH                              =       502,
141         ERR_CANTJOINOPERSONLY                   =       520, // unrealircd, but crap to have so many numerics for cant join..
142         ERR_CANTSENDTOUSER                              =       531, // ???
143
144         RPL_COMMANDS                                            =       702, // insp-specific
145         RPL_COMMANDSEND                                         =       703, // insp-specific
146
147         ERR_WORDFILTERED                                        =       936, // insp-specific, would be nice if we could get rid of this..
148         ERR_CANTUNLOADMODULE                            =       972, // insp-specific
149         RPL_UNLOADEDMODULE                              =       973, // insp-specific
150         ERR_CANTLOADMODULE                              =       974, // insp-specific
151         RPL_LOADEDMODULE                                =       975 // insp-specific
152 };
153
154 #endif