Numerics.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /*
  2. * Numerics.h
  3. * nirc
  4. *
  5. * Created by Niklas Bölter on 05.02.10.
  6. * Copyright 2010 Frubar Corporation.
  7. *
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. *
  15. *
  16. */
  17. #ifndef NIRC_NUMERICS_H
  18. #define NIRC_NUMERICS_H
  19. // RFC 1459 - Internet Relay Chat Protocol
  20. /* REPLIES */
  21. #define RPL_TRACELINK 200 // "Link <version & debug level> <destination> <next server>"
  22. #define RPL_TRACECONNECTING 201 // "Try. <class> <server>"
  23. #define RPL_TRACEHANDSHAKE 202 // "H.S. <class> <server>"
  24. #define RPL_TRACEUNKNOWN 203 // "???? <class> [<client IP address in dot form>]"
  25. #define RPL_TRACEOPERATOR 204 // "Oper <class> <nick>"
  26. #define RPL_TRACEUSER 205 // "User <class> <nick>"
  27. #define RPL_TRACESERVER 206 // "Serv <class> <int>S <int>C <server> <nick!user|*!*>@<host|server>"
  28. #define RPL_TRACENEWTYPE 208 // "<newtype> 0 <client name>"
  29. #define RPL_TRACECLASS 209 // reserved
  30. #define RPL_STATSLINKINFO 211 // "<linkname> <sendq> <sent messages> <sent bytes> <received messages> <received bytes> <time open>"
  31. #define RPL_STATSCOMMANDS 212 // "<command> <count>"
  32. #define RPL_STATSCLINE 213 // "C <host> * <name> <port> <class>"
  33. #define RPL_STATSNLINE 214 // "N <host> * <name> <port> <class>"
  34. #define RPL_STATSILINE 215 // "I <host> * <host> <port> <class>"
  35. #define RPL_STATSKLINE 216 // "K <host> * <username> <port> <class>"
  36. #define RPL_STATSQLINE 217 // reserved
  37. #define RPL_STATSYLINE 218 // "Y <class> <ping frequency> <connect frequency> <max sendq>"
  38. #define RPL_ENDOFSTATS 219 // "<stats letter> :End of /STATS report"
  39. #define RPL_UMODEIS 221 // "<user mode string>"
  40. #define RPL_SERVICEINFO 231 // reserved
  41. #define RPL_ENDOFSERVICES 232 // reserved
  42. #define RPL_SERVICE 233 // reserved
  43. #define RPL_SERVLIST 234 // reserved
  44. #define RPL_SERVLISTEND 235 // reserved
  45. #define RPL_STATSLLINE 241 // "L <hostmask> * <servername> <maxdepth>"
  46. #define RPL_STATSUPTIME 242 // ":Server Up %d days %d:%02d:%02d"
  47. #define RPL_STATSOLINE 243 // "O <hostmask> * <name>"
  48. #define RPL_STATSHLINE 244 // "H <hostmask> * <servername>"
  49. #define RPL_LUSERCLIENT 251 // ":There are <integer> users and <integer> invisible on <integer> servers"
  50. #define RPL_LUSEROP 252 // "<integer> :operator(s) online"
  51. #define RPL_LUSERUNKNOWN 253 // "<integer> :unknown connection(s)"
  52. #define RPL_LUSERCHANNELS 254 // "<integer> :channels formed"
  53. #define RPL_LUSERME 255 // ":I have <integer> clients and <integer> servers"
  54. #define RPL_ADMINME 256 // "<server> :Administrative info"
  55. #define RPL_ADMINLOC1 257 // ":<admin info>"
  56. #define RPL_ADMINLOC2 258 // ":<admin info>"
  57. #define RPL_ADMINEMAIL 259 // ":<admin info>"
  58. #define RPL_TRACELOG 261 // "File <logfile> <debug level>"
  59. #define RPL_NONE 300 // Dummy reply number. Not used.
  60. #define RPL_AWAY 301 // "<nick> :<away message>"
  61. #define RPL_USERHOST 302 // ":[<reply>{<space><reply>}]"
  62. #define RPL_ISON 303 // ":[<nick> {<space><nick>}]"
  63. #define RPL_UNAWAY 305 // ":You are no longer marked as being away"
  64. #define RPL_NOWAWAY 306 // ":You have been marked as being away"
  65. #define RPL_WHOISUSER 311 // "<nick> <user> <host> * :<real name>"
  66. #define RPL_WHOISSERVER 312 // "<nick> <server> :<server info>"
  67. #define RPL_WHOISOPERATOR 313 // "<nick> :is an IRC operator"
  68. #define RPL_WHOWASUSER 314 // "<nick> <user> <host> * :<real name>"
  69. #define RPL_ENDOFWHO 315 // "<name> :End of /WHO list"
  70. #define RPL_WHOISCHANOP 316 // reserved
  71. #define RPL_WHOISIDLE 317 // "<nick> <integer> :seconds idle"
  72. #define RPL_ENDOFWHOIS 318 // "<nick> :End of /WHOIS list"
  73. #define RPL_WHOISCHANNELS 319 // "<nick> :{[@|+]<channel><space>}"
  74. #define RPL_LISTSTART 321 // "Channel :Users Name"
  75. #define RPL_LIST 322 // "<channel> <# visible> :<topic>"
  76. #define RPL_LISTEND 323 // ":End of /LIST"
  77. #define RPL_CHANNELMODEIS 324 // "<channel> <mode> <mode params>"
  78. #define RPL_NOTOPIC 331 // "<channel> :No topic is set"
  79. #define RPL_TOPIC 332 // "<channel> :<topic>"
  80. #define RPL_INVITING 341 // "<channel> <nick>"
  81. #define RPL_SUMMONING 342 // "<user> :Summoning user to IRC"
  82. #define RPL_VERSION 351 // "<version>.<debuglevel> <server> :<comments>"
  83. #define RPL_WHOREPLY 352 // "<channel> <user> <host> <server> <nick> <H|G>[*][@|+] :<hopcount> <real name>"
  84. #define RPL_NAMREPLY 353 // "<channel> :[[@|+]<nick> [[@|+]<nick> [...]]]"
  85. #define RPL_KILLDONE 361 // reserved
  86. #define RPL_CLOSING 362 // reserved
  87. #define RPL_CLOSEEND 363 // reserved
  88. #define RPL_LINKS 364 // "<mask> <server> :<hopcount> <server info>"
  89. #define RPL_ENDOFLINKS 365 // "<mask> :End of /LINKS list"
  90. #define RPL_ENDOFNAMES 366 // "<channel> :End of /NAMES list"
  91. #define RPL_BANLIST 367 // "<channel> <banid>"
  92. #define RPL_ENDOFBANLIST 368 // "<channel> :End of channel ban list"
  93. #define RPL_ENDOFWHOWAS 369 // "<nick> :End of WHOWAS"
  94. #define RPL_INFO 371 // ":<string>"
  95. #define RPL_MOTD 372 // ":- <text>"
  96. #define RPL_INFOSTART 373 // reserved
  97. #define RPL_ENDOFINFO 374 // ":End of /INFO list"
  98. #define RPL_MOTDSTART 375 // ":- <server> Message of the day - "
  99. #define RPL_ENDOFMOTD 376 // ":End of /MOTD command"
  100. #define RPL_YOUREOPER 381 // ":You are now an IRC operator"
  101. #define RPL_REHASHING 382 // "<config file> :Rehashing"
  102. #define RPL_MYPORTIS 384 // reserved
  103. #define RPL_TIME 391 // "<server> :<string showing server's local time>"
  104. #define RPL_USERSSTART 392 // ":UserID Terminal Host"
  105. #define RPL_USERS 393 // ":%-8s %-9s %-8s" (username, ttyline, hostname)
  106. #define RPL_ENDOFUSERS 394 // ":End of users"
  107. #define RPL_NOUSERS 395 // ":Nobody logged in"
  108. /* ERRORS */
  109. #define ERR_NOSUCHNICK 401 // "<nickname> :No such nick/channel"
  110. #define ERR_NOSUCHSERVER 402 // "<server name> :No such server"
  111. #define ERR_NOSUCHCHANNEL 403 // "<channel name> :No such channel"
  112. #define ERR_CANNOTSENDTOCHAN 404 // "<channel name> :Cannot send to channel"
  113. #define ERR_TOOMANYCHANNELS 405 // "<channel name> :You have joined too many channels"
  114. #define ERR_WASNOSUCHNICK 406 // "<nickname> :There was no such nickname"
  115. #define ERR_TOOMANYTARGETS 407 // "<target> :Duplicate recipients. No message delivered"
  116. #define ERR_NOORIGIN 409 // ":No origin specified"
  117. #define ERR_NORECIPIENT 411 // ":No recipient given (<command>)"
  118. #define ERR_NOTEXTTOSEND 412 // ":No text to send"
  119. #define ERR_NOTOPLEVEL 413 // "<mask> :No toplevel domain specified"
  120. #define ERR_WILDTOPLEVEL 414 // "<mask> :Wildcard in toplevel domain"
  121. #define ERR_UNKNOWNCOMMAND 421 // "<command> :Unknown command"
  122. #define ERR_NOMOTD 422 // ":MOTD File is missing"
  123. #define ERR_NOADMININFO 423 // "<server> :No administrative info available"
  124. #define ERR_FILEERROR 424 // ":File error doing <file op> on <file>"
  125. #define ERR_NONICKNAMEGIVEN 431 // ":No nickname given"
  126. #define ERR_ERRONEUSNICKNAME 432 // "<nick> :Erroneus nickname"
  127. #define ERR_NICKNAMEINUSE 433 // "<nick> :Nickname is already in use"
  128. #define ERR_NICKCOLLISION 436 // "<nick> :Nickname collision KILL"
  129. #define ERR_USERNOTINCHANNEL 441 // "<nick> <channel> :They aren't on that channel"
  130. #define ERR_NOTONCHANNEL 442 // "<channel> :You're not on that channel"
  131. #define ERR_USERONCHANNEL 443 // "<user> <channel> :is already on channel"
  132. #define ERR_NOLOGIN 444 // "<user> :User not logged in"
  133. #define ERR_SUMMONDISABLED 445 // ":SUMMON has been disabled"
  134. #define ERR_USERSDISABLED 446 // ":USERS has been disabled"
  135. #define ERR_NOTREGISTERED 451 // ":You have not registered"
  136. #define ERR_NEEDMOREPARAMS 461 // "<command> :Not enough parameters"
  137. #define ERR_ALREADYREGISTRED 462 // ":You may not reregister"
  138. #define ERR_NOPERMFORHOST 463 // ":Your host isn't among the privileged"
  139. #define ERR_PASSWDMISMATCH 464 // ":Password incorrect"
  140. #define ERR_YOUREBANNEDCREEP 465 // ":You are banned from this server"
  141. #define ERR_YOUWILLBEBANNED 466 // reserved
  142. #define ERR_KEYSET 467 // "<channel> :Channel key already set"
  143. #define ERR_CHANNELISFULL 471 // "<channel> :Cannot join channel (+l)"
  144. #define ERR_UNKNOWNMODE 472 // "<char> :is unknown mode char to me"
  145. #define ERR_INVITEONLYCHAN 473 // "<channel> :Cannot join channel (+i)"
  146. #define ERR_BANNEDFROMCHAN 474 // "<channel> :Cannot join channel (+b)"
  147. #define ERR_BADCHANNELKEY 475 // "<channel> :Cannot join channel (+k)"
  148. #define ERR_BADCHANMASK 476 // reserved
  149. #define ERR_NOPRIVILEGES 481 // ":Permission Denied- You're not an IRC operator"
  150. #define ERR_CHANOPRIVSNEEDED 482 // "<channel> :You're not channel operator"
  151. #define ERR_CANTKILLSERVER 483 // ":You cant kill a server!"
  152. #define ERR_NOOPERHOST 491 // ":No O-lines for your host"
  153. #define ERR_NOSERVICEHOST 492 // reserved
  154. #define ERR_UMODEUNKNOWNFLAG 501 // ":Unknown MODE flag"
  155. #define ERR_USERSDONTMATCH 502 // ":Cant change mode for other users"
  156. // RFC 2812 - Internet Relay Chat: Client Protocol
  157. /* Changes from 1459
  158. *
  159. * RPL_LISTSTART is now obsolete
  160. * RPL_NAMREPLY now has "=","*" or "@" prefixes before the channel
  161. * name, indicating public/private/secret channels respectively
  162. * RPL_TRACELINK Parameters added: V<protocol version> <link uptime in seconds> <backstream sendq> <upstream sendq>
  163. * RPL_TRACESERVER Parameter added: V<protocol version>
  164. * RPL_TRACECLASS Now "Class <class> <count>"
  165. * RPL_STATSCOMMANDS Parameters added: <byte count> <remote count>
  166. * RPL_SERVLIST Now "<name> <server> <mask> <type> <hopcount> <info>"
  167. * RPL_SERVLISTEND Now "<mask> <type> :End of service listing"
  168. * ERR_TOOMANYTARGETS I now used more often. "<target> :<error code> recipients. <abort message>"
  169. * ERR_NICKCOLLISION Now shows user and host information: "<nick> :Nickname collision KILL from <user>@<host>"
  170. * ERR_YOUWILLBEBANNED Still no parameters (?!) but no longer reserved.
  171. * ERR_BADCHANMASK Now: "<channel> :Bad Channel Mask"
  172. */
  173. /* REPLIES */
  174. #define RPL_WELCOME 1 // "Welcome to the Internet Relay Network <nick>!<user>@<host>"
  175. #define RPL_YOURHOST 2 // "Your host is <servername>, running version <ver>"
  176. #define RPL_CREATED 3 // "This server was created <date>"
  177. #define RPL_MYINFO 4 // "<servername> <version> <available user modes> <available channel modes>"
  178. #define RPL_BOUNCE 5 // "Try server <server name>, port <port number>"
  179. #define RPL_TRACESERVICE 207 // "Service <class> <name> <type> <active type>"
  180. #define RPL_TRACERECONNECT 210 // Unused.
  181. #define RPL_STATSVLINE 240 // reserved
  182. #define RPL_STATSSLINE 244 // reserved
  183. #define RPL_STATSPING 246 // reserved
  184. #define RPL_STATSBLINE 247 // reserved
  185. #define RPL_STATSDLINE 250 // reserved
  186. #define RPL_TRACEEND 262 // "<server name> <version & debug level> :End of TRACE"
  187. #define RPL_TRYAGAIN 263 // "<command> :Please wait a while and try again."
  188. #define RPL_UNIQOPIS 325 // "<channel> <nickname>"
  189. #define RPL_INVITELIST 346 // "<channel> <invitemask>"
  190. #define RPL_ENDOFINVITELIST 347 // "<channel> :End of channel invite list"
  191. #define RPL_EXCEPTLIST 348 // "<channel> <exceptionmask>"
  192. #define RPL_ENDOFEXCEPTLIST 349 // "<channel> :End of channel exception list"
  193. #define RPL_YOURESERVICE 383 // "You are service <servicename>"
  194. /* ERRORS */
  195. #define ERR_NOSUCHSERVICE 408 // "<service name> :No such service"
  196. #define ERR_BADMASK 415 // "<mask> :Bad Server/host mask"
  197. #define ERR_UNAVAILRESOURCE 437 // "<nick/channel> :Nick/channel is temporarily unavailable"
  198. #define ERR_NOCHANMODES 477 // "<channel> :Channel doesn't support modes"
  199. #define ERR_BANLISTFULL 478 // "<channel> <char> :Channel list is full"
  200. #define ERR_RESTRICTED 484 // ":Your connection is restricted!"
  201. #define ERR_UNIQOPPRIVSNEEDED 485 // ":You're not the original channel operator"
  202. /* Not standardized Shit */
  203. #define RPL_ISUPPORT 5 // Whoever made this the same as RPL_BOUNCE should be forced to use ipchain for the rest of his life
  204. #endif