2 * IRC - Internet Relay Chat, include/numeric.h
3 * Copyright (C) 1990 Jarkko Oikarinen
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 1, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef INCLUDED_numeric_h
22 #define INCLUDED_numeric_h
24 typedef struct Numeric {
33 extern char* err_str(int numeric);
34 extern char* rpl_str(int numeric);
35 extern const struct Numeric* get_error_numeric(int err);
39 * Reserve numerics 000-099 for server-client connections where the client
40 * is local to the server. If any server is passed a numeric in this range
41 * from another server then it is remapped to 100-199. -avalon
44 #define RPL_YOURHOST 2
47 #define RPL_ISUPPORT 5 /* Undernet/Dalnet extension */
48 /* RPL_BOUNCE IRCnet extension */
49 #define RPL_SNOMASK 8 /* Undernet extension */
50 #define RPL_STATMEMTOT 9 /* Undernet extension */
51 #define RPL_STATMEM 10 /* Undernet extension */
52 /* RPL_YOURCOOKIE 14 IRCnet extension */
53 #define RPL_MAP 15 /* Undernet extension */
54 #define RPL_MAPMORE 16 /* Undernet extension */
55 #define RPL_MAPEND 17 /* Undernet extension */
56 /* RPL_ATTEMPTINGJUNC 50 aircd extension */
57 /* RPL_ATTEMPTINGREROUTE 51 aircd extension */
60 * Numberic replies from server commands.
61 * These are currently in the range 200-399.
64 #define RPL_TRACELINK 200
65 #define RPL_TRACECONNECTING 201
66 #define RPL_TRACEHANDSHAKE 202
67 #define RPL_TRACEUNKNOWN 203
68 #define RPL_TRACEOPERATOR 204
69 #define RPL_TRACEUSER 205
70 #define RPL_TRACESERVER 206
71 #define RPL_TRACENEWTYPE 208
72 #define RPL_TRACECLASS 209
73 /* RPL_STATS 210 aircd extension, used instead of having
74 multiple stats numerics */
75 /* RPL_TRACERECONNECT 210 IRCnet extension */
76 #define RPL_STATSLINKINFO 211
77 #define RPL_STATSCOMMANDS 212
78 #define RPL_STATSCLINE 213
79 #define RPL_STATSNLINE 214
80 #define RPL_STATSILINE 215
81 #define RPL_STATSKLINE 216
82 #define RPL_STATSPLINE 217 /* Undernet extenstion */
83 /* RPL_STATSQLINE 217 Various */
84 #define RPL_STATSYLINE 218
85 #define RPL_ENDOFSTATS 219 /* See also RPL_STATSDLINE */
86 /* RPL_STATSPLINE 220 Hybrid - Because 217 was for
88 #define RPL_UMODEIS 221
89 /* RPL_STATSFLINE 224 Hybrid extension */
90 /* RPL_STATSDLINE 225 Hybrid extension */
92 #define RPL_SERVICEINFO 231
93 #define RPL_ENDOFSERVICES 232
94 #define RPL_SERVICE 233
95 #define RPL_SERVLIST 234
96 #define RPL_SERVLISTEND 235
98 /* RPL_STATSIAUTH 239 IRCnet extension */
99 /* RPL_STATSVLINE 240 IRCnet extension */
100 #define RPL_STATSLLINE 241
101 #define RPL_STATSUPTIME 242
102 #define RPL_STATSOLINE 243
103 #define RPL_STATSHLINE 244
104 /* RPL_STATSSLINE 245 Reserved */
105 #define RPL_STATSTLINE 246 /* Undernet extension */
106 #define RPL_STATSGLINE 247 /* Undernet extension */
107 /* RPL_STATSXLINE 247 hybrid extension */
108 #define RPL_STATSULINE 248 /* Undernet extension */
109 #define RPL_STATSDEBUG 249 /* Extension to RFC1459 */
110 #define RPL_STATSCONN 250 /* Undernet extension */
112 #define RPL_LUSERCLIENT 251
113 #define RPL_LUSEROP 252
114 #define RPL_LUSERUNKNOWN 253
115 #define RPL_LUSERCHANNELS 254
116 #define RPL_LUSERME 255
117 #define RPL_ADMINME 256
118 #define RPL_ADMINLOC1 257
119 #define RPL_ADMINLOC2 258
120 #define RPL_ADMINEMAIL 259
122 #define RPL_TRACELOG 261
123 #define RPL_TRACEPING 262 /* Extension to RFC1459 */
124 /* efnet: END_TRACE */
125 /* RPL_LOAD_THROTTLED 263 efnet/hybrid */
127 /* RPL_CURRENT_LOCAL 265 aircd/efnet/hybrid*/
128 /* RPL_CURRENT_GLOBAL 266 aircd/efnet/hybrid */
129 /* RPL_START_NETSTAT 267 aircd */
130 /* RPL_NETSTAT 268 aircd */
131 /* RPL_END_NETSTAT 269 aircd */
133 #define RPL_SILELIST 271 /* Undernet extension */
134 #define RPL_ENDOFSILELIST 272 /* Undernet extension */
135 /* RPL_NOTIFY 273 aircd */
136 /* RPL_END_NOTIFY 274 aircd */
137 /* RPL_STATSDELTA 274 IRCnet extension */
138 #define RPL_STATSDLINE 275 /* Undernet extension */
140 #define RPL_GLIST 280 /* Undernet extension */
141 #define RPL_ENDOFGLIST 281 /* Undernet extension */
143 /* RPL_CHANINFO_HANDLE 285 aircd */
144 /* RPL_CHANINFO_USERS 286 aircd */
145 /* RPL_CHANINFO_CHOPS 287 aircd */
146 /* RPL_CHANINFO_VOICES 288 aircd */
147 /* RPL_CHANINFO_AWAY 289 aircd */
148 /* RPL_CHANINFO_OPERS 290 aircd */
149 /* RPL_CHANINFO_BANNED 291 aircd */
150 /* RPL_CHANINFO_BANS 292 aircd */
151 /* RPL_CHANINFO_INVITE 293 aircd */
152 /* RPL_CHANINFO_INVITES 294 aircd */
153 /* RPL_CHANINFO_KICK 295 aircd */
154 /* RPL_CHANINFO_KICKS 296 aircd */
156 /* RPL_END_CHANINFO 299 aircd */
160 #define RPL_USERHOST 302
163 #define RPL_UNAWAY 305
164 #define RPL_NOWAWAY 306
165 #define RPL_USERIP 307 /* Undernet extension */
167 /* RPL_NOTIFYACTION 308 aircd */
168 /* RPL_NICKTRACE 309 aircd */
169 /* RPL_DALNET_SOMETHING 310 Dalnet, unknown */
170 #define RPL_WHOISUSER 311 /* See also RPL_ENDOFWHOIS */
171 #define RPL_WHOISSERVER 312
172 #define RPL_WHOISOPERATOR 313
173 #define RPL_WHOWASUSER 314 /* See also RPL_ENDOFWHOWAS */
174 #define RPL_ENDOFWHO 315 /* See RPL_WHOREPLY/RPL_WHOSPCRPL */
175 /* RPL_WHOISCHANOP 316 removed from RFC1459 */
176 #define RPL_WHOISIDLE 317
177 #define RPL_ENDOFWHOIS 318 /* See RPL_WHOISUSER/RPL_WHOISSERVER/
178 RPL_WHOISOPERATOR/RPL_WHOISIDLE */
179 #define RPL_WHOISCHANNELS 319
180 /* RPL_WHOIS_HIDDEN 320 Anothernet +h, ick! */
181 #define RPL_LISTSTART 321
183 #define RPL_LISTEND 323
184 #define RPL_CHANNELMODEIS 324
185 /* RPL_CHANNELPASSIS 325 IRCnet extension */
186 /* RPL_UNIQOPIS 325 IRCnet extension */
187 /* RPL_NOCHANPASS 326 IRCnet extension */
188 /* RPL_CHPASSUNKNOWN 327 IRCnet extension */
189 /* RPL_CHANNEL_URL 328 dalnet, anothernet */
190 #define RPL_CREATIONTIME 329
191 /* RPL_WHOWAS_TIME 330 ? */
192 #define RPL_NOTOPIC 331
193 #define RPL_TOPIC 332
194 #define RPL_TOPICWHOTIME 333 /* Undernet extension */
195 #define RPL_LISTUSAGE 334 /* Undernet extension */
196 /* RPL_CHANPASSOK 338 IRCnet extension */
197 /* RPL_BADCHANPASS 339 IRCnet extension */
199 #define RPL_INVITING 341
200 /* RPL_SUMMONING 342 removed from RFC1459 */
202 #define RPL_INVITELIST 346 /* IRCnet, Undernet extension */
203 #define RPL_ENDOFINVITELIST 347 /* IRCnet, Undernet extension */
204 /* RPL_EXCEPTLIST 348 IRCnet extension */
205 /* RPL_ENDOFEXCEPTLIST 349 IRCnet extension */
207 #define RPL_VERSION 351
208 #define RPL_WHOREPLY 352 /* See also RPL_ENDOFWHO */
209 #define RPL_NAMREPLY 353 /* See also RPL_ENDOFNAMES */
210 #define RPL_WHOSPCRPL 354 /* Undernet extension,
211 See also RPL_ENDOFWHO */
213 #define RPL_KILLDONE 361
214 #define RPL_CLOSING 362
215 #define RPL_CLOSEEND 363
216 #define RPL_LINKS 364
217 #define RPL_ENDOFLINKS 365
218 #define RPL_ENDOFNAMES 366 /* See RPL_NAMREPLY */
219 #define RPL_BANLIST 367
220 #define RPL_ENDOFBANLIST 368
221 #define RPL_ENDOFWHOWAS 369
225 #define RPL_INFOSTART 373
226 #define RPL_ENDOFINFO 374
227 #define RPL_MOTDSTART 375
228 #define RPL_ENDOFMOTD 376
230 /* RPL_KICKEXPIRED 377 aircd */
231 /* RPL_BANEXPIRED 378 aircd */
232 /* RPL_KICKLINKED 379 aircd */
233 /* RPL_BANLINKED 380 aircd */
235 #define RPL_YOUREOPER 381
236 #define RPL_REHASHING 382
237 /* RPL_NOWSERVICE 383 ? */
238 #define RPL_MYPORTIS 384
239 #define RPL_NOTOPERANYMORE 385 /* Extension to RFC1459 */
242 /* RPL_START_USERS 392 ? */
243 /* RPL_USERS 393 ? */
244 /* RPL_END_USERS 394 ? */
245 /* RPL_NOUSERS 395 ? */
248 * Errors are in the range from 400-599 currently and are grouped by what
249 * commands they come from.
251 #define ERR_FIRSTERROR 400
252 #define ERR_NOSUCHNICK 401
253 #define ERR_NOSUCHSERVER 402
254 #define ERR_NOSUCHCHANNEL 403
255 #define ERR_CANNOTSENDTOCHAN 404
256 #define ERR_TOOMANYCHANNELS 405
257 #define ERR_WASNOSUCHNICK 406
258 #define ERR_TOOMANYTARGETS 407
259 /* ERR_NOSUCHSERVICE 408 IRCnet */
260 #define ERR_NOORIGIN 409
262 #define ERR_NORECIPIENT 411
263 #define ERR_NOTEXTTOSEND 412
264 #define ERR_NOTOPLEVEL 413
265 #define ERR_WILDTOPLEVEL 414
266 /* ERR_BADMASK 415 IRCnet extension */
267 #define ERR_QUERYTOOLONG 416 /* Undernet extension */
268 /* ERR_TOOMANYMATCHES 416 IRCnet extension */
269 /* ERR_LENGTHTRUNCATED 319 aircd */
271 #define ERR_UNKNOWNCOMMAND 421
272 #define ERR_NOMOTD 422
273 #define ERR_NOADMININFO 423
274 /* ERR_FILEERROR 424 removed from RFC1459 */
276 #define ERR_NONICKNAMEGIVEN 431
277 #define ERR_ERRONEUSNICKNAME 432
278 #define ERR_NICKNAMEINUSE 433
279 /* ERR_SERVICENAMEINUSE 434 ? */
280 /* ERR_SERVICECONFUSED 435 ? */
281 #define ERR_NICKCOLLISION 436
282 #define ERR_BANNICKCHANGE 437 /* Undernet extension */
283 /* ERR_UNAVAILRESOURCE 437 IRCnet extension */
284 #define ERR_NICKTOOFAST 438 /* Undernet extension */
285 /* ERR_DEAD 438 IRCnet reserved for later use */
286 #define ERR_TARGETTOOFAST 439 /* Undernet extension */
288 #define ERR_USERNOTINCHANNEL 441
289 #define ERR_NOTONCHANNEL 442
290 #define ERR_USERONCHANNEL 443
291 /* ERR_NOLOGIN 444 removed from RFC1459 */
292 /* ERR_SUMMONDISABLED 445 removed from RFC1459 */
293 /* ERR_USERSDISABLED 446 removed from RFC1459 */
295 #define ERR_NOTREGISTERED 451
296 /* ERR_IDCOLLISION 452 IRCnet extension ? */
297 /* ERR_NICKLOST 453 IRCnet extension ? */
299 #define ERR_NEEDMOREPARAMS 461
300 #define ERR_ALREADYREGISTRED 462
301 #define ERR_NOPERMFORHOST 463
302 #define ERR_PASSWDMISMATCH 464
303 #define ERR_YOUREBANNEDCREEP 465
304 #define ERR_YOUWILLBEBANNED 466
305 #define ERR_KEYSET 467 /* Undernet extension */
306 #define ERR_INVALIDUSERNAME 468 /* Undernet extension */
308 /* ERR_KICKEDFROMCHAN 470 aircd */
309 #define ERR_CHANNELISFULL 471
310 #define ERR_UNKNOWNMODE 472
311 #define ERR_INVITEONLYCHAN 473
312 #define ERR_BANNEDFROMCHAN 474
313 #define ERR_BADCHANNELKEY 475
314 #define ERR_BADCHANMASK 476 /* Undernet extension */
315 /* ERR_NEEDREGGEDNICK 477 DalNet Extention */
316 #define ERR_BANLISTFULL 478 /* Undernet extension */
317 #define ERR_BADCHANNAME 479 /* EFNet extension */
318 /* 479 Undernet extension badchan */
319 #define ERR_NOPRIVILEGES 481
320 #define ERR_CHANOPRIVSNEEDED 482
321 #define ERR_CANTKILLSERVER 483
322 #define ERR_ISCHANSERVICE 484 /* Undernet extension */
323 /* ERR_UNIQOPRIVSNEEDED 485 IRCnet extension */
324 /* ERR_CHANTOORECENT 487 IRCnet extension */
325 /* ERR_TSLESSCHAN 488 IRCnet extension */
326 #define ERR_VOICENEEDED 489 /* Undernet extension */
328 #define ERR_NOOPERHOST 491
329 /* ERR_NOSERVICEHOST 492 ? */
331 #define ERR_ISOPERLCHAN 498 /* Undernet extension */
333 #define ERR_UMODEUNKNOWNFLAG 501
334 #define ERR_USERSDONTMATCH 502
335 /* ERR_GHOSTEDCLIENT 503 efnet */
337 #define ERR_SILELISTFULL 511 /* Undernet extension */
338 /* ERR_NOTIFYFULL 512 aircd */
339 #define ERR_NOSUCHGLINE 512 /* Undernet extension */
340 #define ERR_BADPING 513 /* Undernet extension */
341 #define ERR_INVALID_ERROR 514
343 #endif /* INCLUDED_numeric_h */