Add more G-line length tests. Resolves SF#2985922.
[ircu2.10.12-pk.git] / ircd / s_err.c
index db98f4cc0bc5e6b22e82049318510026394b80ff..dc45c2eab768055e98103d27eca55ab7f2986896 100644 (file)
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
  */
+/** @file
+ * @brief Error handling support.
+ * @version $Id$
+ */
+#include "config.h"
+
 #include "numeric.h"
+#include "ircd_log.h"
 #include "s_debug.h"
-#include "sprintf_irc.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
+#include <string.h>
 
-static Numeric local_replies[] = {
+/** Array of Numeric replies, indexed by numeric. */
+static Numeric replyTable[] = {
 /* 000 */
   { 0 },
 /* 001 */
-  { RPL_WELCOME, ":Welcome to the Internet Relay Network %s", "001" },
+  { RPL_WELCOME, ":Welcome to the %s IRC Network%s%s, %s", "001" },
 /* 002 */
   { RPL_YOURHOST, ":Your host is %s, running version %s", "002" },
 /* 003 */
   { RPL_CREATED, ":This server was created %s", "003" },
 /* 004 */
-  { RPL_MYINFO, "%s %s dioswkg biklmnopstv", "004" },
+  { RPL_MYINFO, "%s %s %s %s %s", "004" },
 /* 005 */
   { RPL_ISUPPORT, "%s :are supported by this server", "005" },
 /* 006 */
@@ -42,15 +48,11 @@ static Numeric local_replies[] = {
 /* 007 */
   { 0 },
 /* 008 */
-  { RPL_SNOMASK, "%d :: Server notice mask (%#x)", "008" },
+  { RPL_SNOMASK, "%u :: Server notice mask (%#x)", "008" },
 /* 009 */
-  { RPL_STATMEMTOT, "%u %u :Bytes Blocks", "009" },
+  { 0 },
 /* 010 */
-#ifdef MEMSIZESTATS
-  { RPL_STATMEM, "%u %u %s %u", "010" },
-#else
-  { RPL_STATMEM, "%u %u %s", "010" },
-#endif
+  { 0 },
 /* 011 */
   { 0 },
 /* 012 */
@@ -60,480 +62,395 @@ static Numeric local_replies[] = {
 /* 014 */
   { 0 },
 /* 015 */
-  { RPL_MAP, ":%s%s%s %s [%i clients]", "015" },
+  { RPL_MAP, ":%s%s%s %s [%u clients]", "015" },
 /* 016 */
   { RPL_MAPMORE, ":%s%s --> *more*", "016" },
 /* 017 */
   { RPL_MAPEND, ":End of /MAP", "017" },
-  { 0 }
-};
-
-static Numeric numeric_errors[] = {
-/* 400 */
-  { ERR_FIRSTERROR, "", "400" },
-/* 401 */
-  { ERR_NOSUCHNICK, "%s :No such nick", "401" },
-/* 402 */
-  { ERR_NOSUCHSERVER, "%s :No such server", "402" },
-/* 403 */
-  { ERR_NOSUCHCHANNEL, "%s :No such channel", "403" },
-/* 404 */
-  { ERR_CANNOTSENDTOCHAN, "%s :Cannot send to channel", "404" },
-/* 405 */
-  { ERR_TOOMANYCHANNELS, "%s :You have joined too many channels", "405" },
-/* 406 */
-  { ERR_WASNOSUCHNICK, "%s :There was no such nickname", "406" },
-/* 407 */
-  { ERR_TOOMANYTARGETS, "%s :Duplicate recipients. No message delivered", "407" },
-/* 408 */
+/* 018 */
   { 0 },
-/* 409 */
-  { ERR_NOORIGIN, ":No origin specified", "409" },
-/* 410 */
+/* 019 */
   { 0 },
-/* 411 */
-  { ERR_NORECIPIENT, ":No recipient given (%s)", "411" },
-/* 412 */
-  { ERR_NOTEXTTOSEND, ":No text to send", "412" },
-/* 413 */
-  { ERR_NOTOPLEVEL, "%s :No toplevel domain specified", "413" },
-/* 414 */
-  { ERR_WILDTOPLEVEL, "%s :Wildcard in toplevel Domain", "414" },
-/* 415 */
+/* 020 */
   { 0 },
-/* 416 */
-  { ERR_QUERYTOOLONG, "%s :Too many lines in the output, restrict your query", "416" },
-/* 417 */
+/* 021 */
   { 0 },
-/* 418 */
+/* 022 */
   { 0 },
-/* 419 */
+/* 023 */
   { 0 },
-/* 420 */
+/* 024 */
   { 0 },
-/* 421 */
-  { ERR_UNKNOWNCOMMAND, "%s :Unknown command", "421" },
-/* 422 */
-  { ERR_NOMOTD, ":MOTD File is missing", "422" },
-/* 423 */
-  { ERR_NOADMININFO, "%s :No administrative info available", "423" },
-/* 424 */
+/* 025 */
   { 0 },
-/* 425 */
+/* 026 */
   { 0 },
-/* 426 */
+/* 027 */
   { 0 },
-/* 427 */
+/* 028 */
   { 0 },
-/* 428 */
+/* 029 */
   { 0 },
-/* 429 */
+/* 030 */
+  { RPL_APASSWARN_SET, ":Channel Admin password (+A) set to '%s'.  Are you SURE you want to use this as Admin password? You will NOT be able to change this password anymore once the channel is more than 48 hours old!", "030" },
+/* 031 */
+  { RPL_APASSWARN_SECRET, ":Use \"/MODE %s -A %s\" to remove the password and then immediately set a new one.  IMPORTANT: YOU CANNOT RECOVER THIS PASSWORD, EVER; WRITE THE PASSWORD DOWN (don't store this rescue password on disk)! Now set the channel user password (+U).", "031" },
+/* 032 */
+  { RPL_APASSWARN_CLEAR, ":WARNING: You removed the channel Admin password (+A). If you disconnect or leave the channel without setting a new password then you will not be able to set it again!  SET A NEW PASSWORD NOW!", "032" },
+/* 033 */
   { 0 },
-/* 430 */
+/* 034 */
   { 0 },
-/* 431 */
-  { ERR_NONICKNAMEGIVEN, ":No nickname given", "431" },
-/* 432 */
-  { ERR_ERRONEUSNICKNAME, "%s :Erroneous Nickname", "432" },
-/* 433 */
-  { ERR_NICKNAMEINUSE, "%s :Nickname is already in use.", "433" },
-/* 434 */
+/* 035 */
   { 0 },
-/* 435 */
+/* 036 */
   { 0 },
-/* 436 */
-  { ERR_NICKCOLLISION, "%s :Nickname collision KILL", "436" },
-/* 437 */
-  { ERR_BANNICKCHANGE, "%s :Cannot change nickname while banned on channel", "437" },
-/* 438 */
-  { ERR_NICKTOOFAST, "%s :Nick change too fast. Please wait %d seconds.", "438" },
-/* 439 */
-  { ERR_TARGETTOOFAST, "%s :Target change too fast. Please wait %d seconds.", "439" },
-/* 440 */
+/* 037 */
   { 0 },
-/* 441 */
-  { ERR_USERNOTINCHANNEL, "%s %s :They aren't on that channel", "441" },
-/* 442 */
-  { ERR_NOTONCHANNEL, "%s :You're not on that channel", "442" },
-/* 443 */
-  { ERR_USERONCHANNEL, "%s %s :is already on channel", "443" },
-/* 444 */
+/* 038 */
   { 0 },
-/* 445 */
+/* 039 */
   { 0 },
-/* 446 */
+/* 040 */
   { 0 },
-/* 447 */
+/* 041 */
   { 0 },
-/* 448 */
+/* 042 */
   { 0 },
-/* 449 */
+/* 043 */
   { 0 },
-/* 450 */
+/* 044 */
   { 0 },
-/* 451 */
-  { ERR_NOTREGISTERED, ":You have not registered", "451" },
-/* 452 */
+/* 045 */
   { 0 },
-/* 453 */
+/* 046 */
   { 0 },
-/* 454 */
+/* 047 */
   { 0 },
-/* 455 */
+/* 048 */
   { 0 },
-/* 456 */
+/* 049 */
   { 0 },
-/* 457 */
+/* 050 */
   { 0 },
-/* 458 */
+/* 051 */
   { 0 },
-/* 459 */
+/* 052 */
   { 0 },
-/* 460 */
+/* 053 */
   { 0 },
-/* 461 */
-  { ERR_NEEDMOREPARAMS, "%s :Not enough parameters", "461" },
-/* 462 */
-  { ERR_ALREADYREGISTRED, ":You may not reregister", "462" },
-/* 463 */
-  { ERR_NOPERMFORHOST, ":Your host isn't among the privileged", "463" },
-/* 464 */
-  { ERR_PASSWDMISMATCH, ":Password Incorrect", "464" },
-/* 465 */
-  { ERR_YOUREBANNEDCREEP, ":You are banned from this server", "465" },
-/* 466 */
-  { ERR_YOUWILLBEBANNED, "", "466" },
-/* 467 */
-  { ERR_KEYSET, "%s :Channel key already set", "467" },
-/* 468 */
-  { ERR_INVALIDUSERNAME, "", "468" },
-/* 469 */
+/* 054 */
   { 0 },
-/* 470 */
+/* 055 */
   { 0 },
-/* 471 */
-  { ERR_CHANNELISFULL, "%s :Cannot join channel (+l)", "471" },
-/* 472 */
-  { ERR_UNKNOWNMODE, "%c :is unknown mode char to me", "472" },
-/* 473 */
-  { ERR_INVITEONLYCHAN, "%s :Cannot join channel (+i)", "473" },
-/* 474 */
-  { ERR_BANNEDFROMCHAN, "%s :Cannot join channel (+b)", "474" },
-/* 475 */
-  { ERR_BADCHANNELKEY, "%s :Cannot join channel (+k)", "475" },
-/* 476 */
-  { ERR_BADCHANMASK, "%s :Bad Channel Mask", "476" },
-/* 477 */
+/* 056 */
   { 0 },
-/* 478 */
-  { ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full", "478" },
-/* 479 */
-  { ERR_BADCHANNAME, "%s :Cannot join channel (access denied on this server)", "479" },
-/* 480 */
+/* 057 */
   { 0 },
-/* 481 */
-  { ERR_NOPRIVILEGES, ":Permission Denied: You're not an IRC operator", "481" },
-/* 482 */
-  { ERR_CHANOPRIVSNEEDED, "%s :You're not channel operator", "482" },
-/* 483 */
-  { ERR_CANTKILLSERVER, ":You cant kill a server!", "483" },
-/* 484 */
-  { ERR_ISCHANSERVICE, "%s %s :Cannot kill, kick or deop channel service", "484" },
-/* 485 */
+/* 058 */
   { 0 },
-/* 486 */
+/* 059 */
   { 0 },
-/* 487 */
+/* 060 */
   { 0 },
-/* 488 */
+/* 061 */
   { 0 },
-/* 489 */
-  { ERR_VOICENEEDED, "%s :You're neither voiced nor channel operator", "489" },
-/* 490 */
+/* 062 */
   { 0 },
-/* 491 */
-  { ERR_NOOPERHOST, ":No O-lines for your host", "491" },
-/* 492 */
+/* 063 */
   { 0 },
-/* 493 */
+/* 064 */
   { 0 },
-/* 494 */
+/* 065 */
   { 0 },
-/* 495 */
+/* 066 */
   { 0 },
-/* 496 */
+/* 067 */
   { 0 },
-/* 497 */
+/* 068 */
   { 0 },
-/* 498 */
-  { ERR_ISOPERLCHAN, "%s %s :Cannot kick or deop an IRC Operator on a local channel", "498" },
-/* 499 */
+/* 069 */
   { 0 },
-/* 500 */
+/* 070 */
   { 0 },
-/* 501 */
-  { ERR_UMODEUNKNOWNFLAG, ":Unknown MODE flag", "501" },
-/* 502 */
-  { ERR_USERSDONTMATCH, ":Cant change mode for other users", "502" },
-/* 503 */
+/* 071 */
   { 0 },
-/* 504 */
+/* 072 */
   { 0 },
-/* 505 */
+/* 073 */
   { 0 },
-/* 506 */
+/* 074 */
   { 0 },
-/* 507 */
+/* 075 */
   { 0 },
-/* 508 */
+/* 076 */
   { 0 },
-/* 509 */
+/* 077 */
   { 0 },
-/* 510 */
+/* 078 */
   { 0 },
-/* 511 */
-  { ERR_SILELISTFULL, "%s :Your silence list is full", "511" },
-/* 512 */
-  { ERR_NOSUCHGLINE, "%s :No such gline", "512" },
-/* 513 */
-  { ERR_BADPING, "", "513" },
-/* 514 */
-  { ERR_NOSUCHJUPE, "%s :No such jupe", "514" },
-/* 515 */
-  { ERR_BADEXPIRE, TIME_T_FMT " :Bad expire time", "515" },
-/* 516 */
-  { ERR_DONTCHEAT, " :Don't Cheat.", "516" }
-};
-
-static Numeric numeric_replies[] = {
-/* 300 */
-  { RPL_NONE, 0, "300" },
-/* 301 */
-  { RPL_AWAY, "%s :%s", "301" },
-/* 302 */
-  { RPL_USERHOST, ":", "302" },
-/* 303 */
-  { RPL_ISON, ":", "303" },
-/* 304 */
-  { RPL_TEXT, 0, "304" },
-/* 305 */
-  { RPL_UNAWAY, ":You are no longer marked as being away", "305" },
-/* 306 */
-  { RPL_NOWAWAY, ":You have been marked as being away", "306" },
-/* 307 */
-  { RPL_USERIP, ":", "307" },
-/* 308 */
+/* 079 */
   { 0 },
-/* 309 */
+/* 080 */
   { 0 },
-/* 310 */
+/* 081 */
   { 0 },
-/* 311 */
-  { RPL_WHOISUSER, "%s %s %s * :%s", "311" },
-/* 312 */
-  { RPL_WHOISSERVER, "%s %s :%s", "312" },
-/* 313 */
-  { RPL_WHOISOPERATOR, "%s :is an IRC Operator", "313" },
-/* 314 */
-  { RPL_WHOWASUSER, "%s %s %s * :%s", "314" },
-/* 315 */
-  { RPL_ENDOFWHO, "%s :End of /WHO list.", "315" },
-/* 316 */
+/* 082 */
   { 0 },
-/* 317 */
-  { RPL_WHOISIDLE, "%s %ld %ld :seconds idle, signon time", "317" },
-/* 318 */
-  { RPL_ENDOFWHOIS, "%s :End of /WHOIS list.", "318" },
-/* 319 */
-  { RPL_WHOISCHANNELS, "%s :%s", "319" },
-/* 320 */
+/* 083 */
   { 0 },
-/* 321 */
-  { RPL_LISTSTART, "Channel :Users  Name", "321" },
-/* 322 */
-  { RPL_LIST, "%s %d :%s", "322" },
-/* 323 */
-  { RPL_LISTEND, ":End of /LIST", "323" },
-/* 324 */
-  { RPL_CHANNELMODEIS, "%s %s %s", "324" },
-/* 325 */
+/* 084 */
   { 0 },
-/* 326 */
+/* 085 */
   { 0 },
-/* 327 */
+/* 086 */
   { 0 },
-/* 328 */
+/* 087 */
   { 0 },
-/* 329 */
-  { RPL_CREATIONTIME, "%s " TIME_T_FMT, "329" },
-/* 330 */
+/* 088 */
   { 0 },
-/* 331 */
-  { RPL_NOTOPIC, "%s :No topic is set.", "331" },
-/* 332 */
-  { RPL_TOPIC, "%s :%s", "332" },
-/* 333 */
-  { RPL_TOPICWHOTIME, "%s %s " TIME_T_FMT, "333" },
-/* 334 */
-  { RPL_LISTUSAGE, ":%s", "334" },
-/* 335 */
+/* 089 */
   { 0 },
-/* 336 */
+/* 090 */
   { 0 },
-/* 337 */
+/* 091 */
   { 0 },
-/* 338 */
+/* 092 */
   { 0 },
-/* 339 */
+/* 093 */
   { 0 },
-/* 340 */
+/* 094 */
   { 0 },
-/* 341 */
-  { RPL_INVITING, "%s %s", "341" },
-/* 342 */
+/* 095 */
   { 0 },
-/* 343 */
+/* 096 */
   { 0 },
-/* 344 */
+/* 097 */
   { 0 },
-/* 345 */
+/* 098 */
   { 0 },
-/* 346 */
-  { RPL_INVITELIST, ":%s", "346" },
-/* 347 */
-  { RPL_ENDOFINVITELIST, ":End of Invite List", "347" },
-/* 348 */
+/* 099 */
   { 0 },
-/* 349 */
+/* 100 */
   { 0 },
-/* 350 */
+/* 101 */
   { 0 },
-/* 351 */
-  { RPL_VERSION, "%s.%s %s :%s", "351" },
-/* 352 */
-  { RPL_WHOREPLY, "%s", "352" },
-/* 353 */
-  { RPL_NAMREPLY, "%s", "353" },
-/* 354 */
-  { RPL_WHOSPCRPL, "%s", "354" },
-/* 355 */
+/* 102 */
   { 0 },
-/* 356 */
+/* 103 */
   { 0 },
-/* 357 */
+/* 104 */
   { 0 },
-/* 358 */
+/* 105 */
   { 0 },
-/* 359 */
+/* 106 */
   { 0 },
-/* 360 */
+/* 107 */
   { 0 },
-/* 361 */
-  { RPL_KILLDONE, 0, "361" }, /* Not used */
-/* 362 */
-  { RPL_CLOSING, "%s :Operator enforced Close", "362" },
-/* 363 */
-  { RPL_CLOSEEND, "%d :Connections Closed", "363" },
-/* 364 */
-#ifndef GODMODE
-  { RPL_LINKS, "%s %s :%d P%u %s", "364" },
-#else /* GODMODE */
-  { RPL_LINKS, "%s %s :%d P%u " TIME_T_FMT " (%s) %s", "364" },
-#endif /* GODMODE */
-/* 365 */
-  { RPL_ENDOFLINKS, "%s :End of /LINKS list.", "365" },
-/* 366 */
-  { RPL_ENDOFNAMES, "%s :End of /NAMES list.", "366" },
-/* 367 */
-  { RPL_BANLIST, "%s %s %s " TIME_T_FMT, "367" },
-/* 368 */
-  { RPL_ENDOFBANLIST, "%s :End of Channel Ban List", "368" },
-/* 369 */
-  { RPL_ENDOFWHOWAS, "%s :End of WHOWAS", "369" },
-/* 370 */
+/* 108 */
   { 0 },
-/* 371 */
-  { RPL_INFO, ":%s", "371" },
-/* 372 */
-  { RPL_MOTD, ":- %s", "372" },
-/* 373 */
-  { RPL_INFOSTART, ":Server INFO", "373" },
-/* 374 */
-  { RPL_ENDOFINFO, ":End of /INFO list.", "374" },
-/* 375 */
-  { RPL_MOTDSTART, ":- %s Message of the Day - ", "375" },
-/* 376 */
-  { RPL_ENDOFMOTD, ":End of /MOTD command.", "376" },
-/* 377 */
+/* 109 */
   { 0 },
-/* 378 */
+/* 110 */
   { 0 },
-/* 379 */
+/* 111 */
   { 0 },
-/* 380 */
+/* 112 */
   { 0 },
-/* 381 */
-  { RPL_YOUREOPER, ":You are now an IRC Operator", "381" },
-/* 382 */
-  { RPL_REHASHING, "%s :Rehashing", "382" },
-/* 383 */
+/* 113 */
   { 0 },
-/* 384 */
-  { RPL_MYPORTIS, "%d :Port to local server is", "384" }, /* not used */
-/* 385 */
-  { RPL_NOTOPERANYMORE, 0, "385" }, /* not used */
-/* 386 */
+/* 114 */
   { 0 },
-/* 387 */
+/* 115 */
   { 0 },
-/* 388 */
+/* 116 */
   { 0 },
-/* 389 */
+/* 117 */
   { 0 },
-/* 390 */
+/* 118 */
   { 0 },
-/* 391 */
-  { RPL_TIME, "%s " TIME_T_FMT " %ld :%s", "391" },
-/* 392 */
+/* 119 */
   { 0 },
-/* 393 */
+/* 120 */
   { 0 },
-/* 394 */
+/* 121 */
   { 0 },
-/* 395 */
+/* 122 */
   { 0 },
-/* 396 */
+/* 123 */
   { 0 },
-/* 397 */
+/* 124 */
   { 0 },
-/* 398 */
+/* 125 */
   { 0 },
-/* 399 */
+/* 126 */
+  { 0 },
+/* 127 */
+  { 0 },
+/* 128 */
+  { 0 },
+/* 129 */
+  { 0 },
+/* 130 */
+  { 0 },
+/* 131 */
+  { 0 },
+/* 132 */
+  { 0 },
+/* 133 */
+  { 0 },
+/* 134 */
+  { 0 },
+/* 135 */
+  { 0 },
+/* 136 */
+  { 0 },
+/* 137 */
+  { 0 },
+/* 138 */
+  { 0 },
+/* 139 */
+  { 0 },
+/* 140 */
+  { 0 },
+/* 141 */
+  { 0 },
+/* 142 */
+  { 0 },
+/* 143 */
+  { 0 },
+/* 144 */
+  { 0 },
+/* 145 */
+  { 0 },
+/* 146 */
+  { 0 },
+/* 147 */
+  { 0 },
+/* 148 */
+  { 0 },
+/* 149 */
+  { 0 },
+/* 150 */
+  { 0 },
+/* 151 */
+  { 0 },
+/* 152 */
+  { 0 },
+/* 153 */
+  { 0 },
+/* 154 */
+  { 0 },
+/* 155 */
+  { 0 },
+/* 156 */
+  { 0 },
+/* 157 */
+  { 0 },
+/* 158 */
+  { 0 },
+/* 159 */
+  { 0 },
+/* 160 */
+  { 0 },
+/* 161 */
+  { 0 },
+/* 162 */
+  { 0 },
+/* 163 */
+  { 0 },
+/* 164 */
+  { 0 },
+/* 165 */
+  { 0 },
+/* 166 */
+  { 0 },
+/* 167 */
+  { 0 },
+/* 168 */
+  { 0 },
+/* 169 */
+  { 0 },
+/* 170 */
+  { 0 },
+/* 171 */
+  { 0 },
+/* 172 */
+  { 0 },
+/* 173 */
+  { 0 },
+/* 174 */
+  { 0 },
+/* 175 */
+  { 0 },
+/* 176 */
+  { 0 },
+/* 177 */
+  { 0 },
+/* 178 */
+  { 0 },
+/* 179 */
+  { 0 },
+/* 180 */
+  { 0 },
+/* 181 */
+  { 0 },
+/* 182 */
+  { 0 },
+/* 183 */
+  { 0 },
+/* 184 */
+  { 0 },
+/* 185 */
+  { 0 },
+/* 186 */
+  { 0 },
+/* 187 */
+  { 0 },
+/* 188 */
+  { 0 },
+/* 189 */
+  { 0 },
+/* 190 */
+  { 0 },
+/* 191 */
+  { 0 },
+/* 192 */
+  { 0 },
+/* 193 */
+  { 0 },
+/* 194 */
+  { 0 },
+/* 195 */
+  { 0 },
+/* 196 */
+  { 0 },
+/* 197 */
+  { 0 },
+/* 198 */
+  { 0 },
+/* 199 */
   { 0 },
 /* 200 */
-#ifndef GODMODE
-  { RPL_TRACELINK, "Link %s%s %s %s", "200" },
-#else /* GODMODE */
-  { RPL_TRACELINK, "Link %s%s %s %s " TIME_T_FMT, "200" },
-#endif /* GODMODE */
+  { RPL_TRACELINK, "Link %s.%s %s %s", "200" },
 /* 201 */
-  { RPL_TRACECONNECTING, "Try. %d %s", "201" },
+  { RPL_TRACECONNECTING, "Try. %s %s", "201" },
 /* 202 */
-  { RPL_TRACEHANDSHAKE, "H.S. %d %s", "202" },
+  { RPL_TRACEHANDSHAKE, "H.S. %s %s", "202" },
 /* 203 */
-  { RPL_TRACEUNKNOWN, "???? %d %s", "203" },
+  { RPL_TRACEUNKNOWN, "???? %s %s", "203" },
 /* 204 */
-  { RPL_TRACEOPERATOR, "Oper %d %s %ld", "204" },
+  { RPL_TRACEOPERATOR, "Oper %s %s %ld", "204" },
 /* 205 */
-  { RPL_TRACEUSER, "User %d %s %ld", "205" },
+  { RPL_TRACEUSER, "User %s %s %ld", "205" },
 /* 206 */
-  { RPL_TRACESERVER, "Serv %d %dS %dC %s %s!%s@%s %ld %ld", "206" },
+  { RPL_TRACESERVER, "Serv %s %dS %dC %s %s!%s@%s %ld %ld", "206" },
 /* 207 */
   { 0 },
 /* 208 */
   { RPL_TRACENEWTYPE, "<newtype> 0 %s", "208" },
 /* 209 */
-  { RPL_TRACECLASS, "Class %d %d", "209" },
+  { RPL_TRACECLASS, "Class %s %u", "209" },
 /* 210 */
   { 0 },
 /* 211 */
@@ -541,25 +458,25 @@ static Numeric numeric_replies[] = {
 /* 212 */
   { RPL_STATSCOMMANDS, "%s %u %u", "212" },
 /* 213 */
-  { RPL_STATSCLINE, "%c %s * %s %d %d", "213" },
+  { RPL_STATSCLINE, "C %s * %d %d %s %s", "213" },
 /* 214 */
-  { RPL_STATSNLINE, "%c %s * %s %d %d", "214" },
+  { 0 },
 /* 215 */
-  { RPL_STATSILINE, "%c %s * %s %d %d", "215" },
+  { RPL_STATSILINE, "I %s%s%s %d %s%s %d %s", "215" },
 /* 216 */
-  { RPL_STATSKLINE, "%c %s %s %s %d %d", "216" },
+  { RPL_STATSKLINE, "%c %s@%s \"%s\" \"%s\" 0 0", "216" },
 /* 217 */
   { RPL_STATSPLINE, "P %d %d %s %s", "217" },
 /* 218 */
-  { RPL_STATSYLINE, "%c %d %d %d %d %ld", "218" },
+  { RPL_STATSYLINE, "%c %s %d %d %u %u %u", "218" },
 /* 219 */
-  { RPL_ENDOFSTATS, "%c :End of /STATS report", "219" },
+  { RPL_ENDOFSTATS, "%s :End of /STATS report", "219" },
 /* 220 */
   { 0 },
 /* 221 */
   { RPL_UMODEIS, "%s", "221" },
 /* 222 */
-  { 0 },
+  { RPL_STATSJLINE, "J %s", "222" },
 /* 223 */
   { 0 },
 /* 224 */
@@ -567,65 +484,65 @@ static Numeric numeric_replies[] = {
 /* 225 */
   { 0 },
 /* 226 */
-  { 0 },
+  { RPL_STATSALINE, "%s", "226" },
 /* 227 */
   { 0 },
 /* 228 */
-  { 0 },
+  { RPL_STATSQLINE, "Q %s :%s", "228" },
 /* 229 */
   { 0 },
 /* 230 */
   { 0 },
 /* 231 */
-  { RPL_SERVICEINFO, 0, "231" },
+  { 0 },
 /* 232 */
-  { RPL_ENDOFSERVICES, 0, "232" },
+  { 0 },
 /* 233 */
-  { RPL_SERVICE, 0, "233" },
+  { 0 },
 /* 234 */
-  { RPL_SERVLIST, 0, "234" },
+  { 0 },
 /* 235 */
-  { RPL_SERVLISTEND, 0, "235" },
-/* 236 */
   { 0 },
+/* 236 */
+  { RPL_STATSVERBOSE, "V :Sent as explicit", "236" },
 /* 237 */
-  { 0 },
+  { RPL_STATSENGINE, "%s :Event loop engine", "237" },
 /* 238 */
-  { 0 },
+  { RPL_STATSFLINE, "F %s %s", "238" },
 /* 239 */
   { 0 },
 /* 240 */
   { 0 },
 /* 241 */
-  { RPL_STATSLLINE, "%c %s * %s %d %d", "241" },
+  { RPL_STATSLLINE, "Module Description EntryPoint", "241" },
 /* 242 */
   { RPL_STATSUPTIME, ":Server Up %d days, %d:%02d:%02d", "242" },
 /* 243 */
-  { RPL_STATSOLINE, "%c %s * %s %d %d", "243" },
+  { RPL_STATSOLINE, "%c %s@%s * %s %s", "243" },
 /* 244 */
-  { RPL_STATSHLINE, "%c %s * %s %d %d", "244" },
+  { 0 },
 /* 245 */
   { 0 },
 /* 246 */
   { RPL_STATSTLINE, "%c %s %s", "246" },
 /* 247 */
-  { RPL_STATSGLINE, "%c %s@%s " TIME_T_FMT " :%s", "247" },
+  { RPL_STATSGLINE, "%c %s%s%s %Tu %Tu %Tu %s%c :%s", "247" },
 /* 248 */
-  { RPL_STATSULINE, "%c %s %s %s %d %d", "248" },
+  { RPL_STATSULINE, "U %s", "248" },
 /* 249 */
-  { 0 },
+  { RPL_STATSDEBUG, 0, "249" },
 /* 250 */
-  { RPL_STATSCONN, ":Highest connection count: %d (%d clients)", "250" },
+  { RPL_STATSCONN, ":Highest connection count: %u (%u clients)", "250" },
 /* 251 */
-  { RPL_LUSERCLIENT, ":There are %d users and %d invisible on %d servers", "251" },
+  { RPL_LUSERCLIENT, ":There are %u users and %u invisible on %u servers", "251" },
 /* 252 */
-  { RPL_LUSEROP, "%d :operator(s) online", "252" },
+  { RPL_LUSEROP, "%u :operator(s) online", "252" },
 /* 253 */
-  { RPL_LUSERUNKNOWN, "%d :unknown connection(s)", "253" },
+  { RPL_LUSERUNKNOWN, "%u :unknown connection(s)", "253" },
 /* 254 */
-  { RPL_LUSERCHANNELS, "%d :channels formed", "254" },
+  { RPL_LUSERCHANNELS, "%u :channels formed", "254" },
 /* 255 */
-  { RPL_LUSERME, ":I have %d clients and %d servers", "255" },
+  { RPL_LUSERME, ":I have %u clients and %u servers", "255" },
 /* 256 */
   { RPL_ADMINME, ":Administrative info about %s", "256" },
 /* 257 */
@@ -637,9 +554,9 @@ static Numeric numeric_replies[] = {
 /* 260 */
   { 0 },
 /* 261 */
-  { RPL_TRACELOG, "File %s %d", "261" },
+  { 0 },
 /* 262 */
-  { RPL_TRACEPING, "Ping %s %s", "262" },
+  { RPL_TRACEEND, ":End of TRACE", "262" },
 /* 263 */
   { 0 },
 /* 264 */
@@ -655,9 +572,9 @@ static Numeric numeric_replies[] = {
 /* 269 */
   { 0 },
 /* 270 */
-  { 0 },
+  { RPL_PRIVS, "%s :", "270" },
 /* 271 */
-  { RPL_SILELIST, "%s %s", "271" },
+  { RPL_SILELIST, "%s %s%s", "271" },
 /* 272 */
   { RPL_ENDOFSILELIST, "%s :End of Silence List", "272" },
 /* 273 */
@@ -667,7 +584,7 @@ static Numeric numeric_replies[] = {
 /* 275 */
   { RPL_STATSDLINE, "%c %s %s", "275" },
 /* 276 */
-  { 0 },
+  { RPL_STATSRLINE, "%-9s %-9s %-10s %s", "276" },
 /* 277 */
   { 0 },
 /* 278 */
@@ -675,105 +592,682 @@ static Numeric numeric_replies[] = {
 /* 279 */
   { 0 },
 /* 280 */
-  { RPL_GLIST, "%s%s%s " TIME_T_FMT " %s %c :%s", "280" },
+  { RPL_GLIST, "%s%s%s %Tu %Tu %Tu %s %s%c :%s", "280" },
 /* 281 */
   { RPL_ENDOFGLIST, ":End of G-line List", "281" },
 /* 282 */
-  { RPL_JUPELIST, "%s " TIME_T_FMT " %s %c :%s", "282" },
+  { RPL_JUPELIST, "%s %Tu %s %c :%s", "282" },
 /* 283 */
   { RPL_ENDOFJUPELIST, ":End of Jupe List", "283" },
 /* 284 */
-  { 0 }
-};
-
-const struct Numeric* get_error_numeric(int numeric)
-{
-  int num = numeric;
-  assert(ERR_FIRSTERROR < num);
-  assert(num < ERR_LASTERROR);
-
-  num -= ERR_FIRSTERROR;
-  assert(0 != numeric_errors[num].value);
-
-  return &numeric_errors[num];
-}
-
-static char numbuff[512];
-
-/* "inline" */
-#define prepbuf(buffer, num, tail)                      \
-{                                                       \
-  char *s = buffer + 4;                 \
-  const char *ap = atoi_tab + (num << 2);       \
-                                                        \
-  strcpy(buffer, ":%s 000 %s ");                        \
-  *s++ = *ap++;                                         \
-  *s++ = *ap++;                                         \
-  *s = *ap;                                             \
-  strcpy(s + 5, tail);                                  \
-}
-
-char *err_str(int numeric)
-{
-  Numeric *nptr;
-  int num = numeric;
-
-  num -= numeric_errors[0].value;
-
-#ifdef DEBUGMODE
-  if (num < 0 || num > ERR_USERSDONTMATCH)
-    sprintf_irc(numbuff,
-        ":%%s %d %%s :INTERNAL ERROR: BAD NUMERIC! %d", numeric, num);
-  else
-  {
-    nptr = &numeric_errors[num];
-    if (!nptr->format || !nptr->value)
-      sprintf_irc(numbuff, ":%%s %d %%s :NO ERROR FOR NUMERIC ERROR %d",
-          numeric, num);
-    else
-      prepbuf(numbuff, nptr->value, nptr->format);
-  }
-#else
-  nptr = &numeric_errors[num];
-  prepbuf(numbuff, nptr->value, nptr->format);
-#endif
-
-  return numbuff;
-}
-
-char *rpl_str(int numeric)
-{
-  Numeric *nptr;
-  int num = numeric;
-
-  if (num > (int)(sizeof(local_replies) / sizeof(Numeric) - 2))
-    num -= (num > 300) ? 300 : 100;
-
-#ifdef DEBUGMODE
-  if (num < 0 || num > 200)
-    sprintf_irc(numbuff, ":%%s %d %%s :INTERNAL REPLY ERROR: BAD NUMERIC! %d",
-        numeric, num);
-  else
-  {
-    if (numeric > 99)
-      nptr = &numeric_replies[num];
-    else
-      nptr = &local_replies[num];
-    Debug((DEBUG_NUM, "rpl_str: numeric %d num %d %d %s",
-        numeric, num, nptr->value, nptr->format ? nptr->format : ""));
-    if (!nptr->format || !nptr->value)
-      sprintf_irc(numbuff, ":%%s %d %%s :NO REPLY FOR NUMERIC ERROR %d",
-          numeric, num);
-    else
-      prepbuf(numbuff, nptr->value, nptr->format);
-  }
-#else
-  if (numeric > 99)
-    nptr = &numeric_replies[num];
-  else
-    nptr = &local_replies[num];
-  prepbuf(numbuff, nptr->value, nptr->format);
-#endif
-
-  return numbuff;
-}
+  { RPL_FEATURE, 0, "284" },
+/* 285 */
+  { 0 },
+/* 286 */
+  { 0 },
+/* 287 */
+  { 0 },
+/* 288 */
+  { 0 },
+/* 289 */
+  { 0 },
+/* 290 */
+  { 0 },
+/* 291 */
+  { 0 },
+/* 292 */
+  { 0 },
+/* 293 */
+  { 0 },
+/* 294 */
+  { 0 },
+/* 295 */
+  { 0 },
+/* 296 */
+  { 0 },
+/* 297 */
+  { 0 },
+/* 298 */
+  { 0 },
+/* 299 */
+  { 0 },
+/* 300 */
+  { 0 },
+/* 301 */
+  { RPL_AWAY, "%s :%s", "301" },
+/* 302 */
+  { RPL_USERHOST, ":", "302" },
+/* 303 */
+  { RPL_ISON, ":", "303" },
+/* 304 */
+  { 0 },
+/* 305 */
+  { RPL_UNAWAY, ":You are no longer marked as being away", "305" },
+/* 306 */
+  { RPL_NOWAWAY, ":You have been marked as being away", "306" },
+/* 307 */
+  { 0 },
+/* 308 */
+  { 0 },
+/* 309 */
+  { 0 },
+/* 310 */
+  { 0 },
+/* 311 */
+  { RPL_WHOISUSER, "%s %s %s * :%s", "311" },
+/* 312 */
+  { RPL_WHOISSERVER, "%s %s :%s", "312" },
+/* 313 */
+  { RPL_WHOISOPERATOR, "%s :is an IRC Operator", "313" },
+/* 314 */
+  { RPL_WHOWASUSER, "%s %s %s * :%s", "314" },
+/* 315 */
+  { RPL_ENDOFWHO, "%s :End of /WHO list.", "315" },
+/* 316 */
+  { 0 },
+/* 317 */
+  { RPL_WHOISIDLE, "%s %ld %ld :seconds idle, signon time", "317" },
+/* 318 */
+  { RPL_ENDOFWHOIS, "%s :End of /WHOIS list.", "318" },
+/* 319 */
+  { RPL_WHOISCHANNELS, "%s :%s", "319" },
+/* 320 */
+  { 0 },
+/* 321 */
+  { RPL_LISTSTART, "Channel :Users  Name", "321" },
+/* 322 */
+  { RPL_LIST, "%s %u :%s", "322" },
+/* 323 */
+  { RPL_LISTEND, ":End of /LIST", "323" },
+/* 324 */
+  { RPL_CHANNELMODEIS, "%s %s %s", "324" },
+/* 325 */
+  { 0 },
+/* 326 */
+  { 0 },
+/* 327 */
+  { 0 },
+/* 328 */
+  { 0 },
+/* 329 */
+  { RPL_CREATIONTIME, "%s %Tu", "329" },
+/* 330 */
+  { RPL_WHOISACCOUNT, "%s %s :is logged in as", "330" },
+/* 331 */
+  { RPL_NOTOPIC, "%s :No topic is set.", "331" },
+/* 332 */
+  { RPL_TOPIC, "%s :%s", "332" },
+/* 333 */
+  { RPL_TOPICWHOTIME, "%s %s %Tu", "333" },
+/* 334 */
+  { RPL_LISTUSAGE, ":%s", "334" },
+/* 335 */
+  { 0 },
+/* 336 */
+  { 0 },
+/* 337 */
+  { 0 },
+/* 338 */
+  { RPL_WHOISACTUALLY, "%s %s@%s %s :Actual user@host, Actual IP", "338" },
+/* 339 */
+  { 0 },
+/* 340 */
+  { RPL_USERIP, ":", "340" },
+/* 341 */
+  { RPL_INVITING, "%s %s", "341" },
+/* 342 */
+  { 0 },
+/* 343 */
+  { 0 },
+/* 344 */
+  { 0 },
+/* 345 */
+  { RPL_ISSUEDINVITE, "%s %s %s :%s has been invited by %s", "345" },
+/* 346 */
+  { RPL_INVITELIST, ":%s", "346" },
+/* 347 */
+  { RPL_ENDOFINVITELIST, ":End of Invite List", "347" },
+/* 348 */
+  { 0 },
+/* 349 */
+  { 0 },
+/* 350 */
+  { 0 },
+/* 351 */
+  { RPL_VERSION, "%s.%s %s :%s", "351" },
+/* 352 */
+  { RPL_WHOREPLY, "%s", "352" },
+/* 353 */
+  { RPL_NAMREPLY, "%s", "353" },
+/* 354 */
+  { RPL_WHOSPCRPL, "%s", "354" },
+/* 355 */
+  { RPL_DELNAMREPLY, "%s", "355" },
+/* 356 */
+  { 0 },
+/* 357 */
+  { 0 },
+/* 358 */
+  { 0 },
+/* 359 */
+  { 0 },
+/* 360 */
+  { 0 },
+/* 361 */
+  { 0 },
+/* 362 */
+  { RPL_CLOSING, "%s :Operator enforced Close", "362" },
+/* 363 */
+  { RPL_CLOSEEND, "%d :Connections Closed", "363" },
+/* 364 */
+  { RPL_LINKS, "%s %s :%u P%u %s", "364" },
+/* 365 */
+  { RPL_ENDOFLINKS, "%s :End of /LINKS list.", "365" },
+/* 366 */
+  { RPL_ENDOFNAMES, "%s :End of /NAMES list.", "366" },
+/* 367 */
+  { RPL_BANLIST, "%s %s %s %Tu", "367" },
+/* 368 */
+  { RPL_ENDOFBANLIST, "%s :End of Channel Ban List", "368" },
+/* 369 */
+  { RPL_ENDOFWHOWAS, "%s :End of WHOWAS", "369" },
+/* 370 */
+  { 0 },
+/* 371 */
+  { RPL_INFO, ":%s", "371" },
+/* 372 */
+  { RPL_MOTD, ":- %s", "372" },
+/* 373 */
+  { 0 },
+/* 374 */
+  { RPL_ENDOFINFO, ":End of /INFO list.", "374" },
+/* 375 */
+  { RPL_MOTDSTART, ":- %s Message of the Day - ", "375" },
+/* 376 */
+  { RPL_ENDOFMOTD, ":End of /MOTD command.", "376" },
+/* 377 */
+  { 0 },
+/* 378 */
+  { 0 },
+/* 379 */
+  { 0 },
+/* 380 */
+  { 0 },
+/* 381 */
+  { RPL_YOUREOPER, ":You are now an IRC Operator", "381" },
+/* 382 */
+  { RPL_REHASHING, "%s :Rehashing", "382" },
+/* 383 */
+  { 0 },
+/* 384 */
+  { 0 },
+/* 385 */
+  { 0 },
+/* 386 */
+  { 0 },
+/* 387 */
+  { 0 },
+/* 388 */
+  { 0 },
+/* 389 */
+  { 0 },
+/* 390 */
+  { 0 },
+/* 391 */
+  { RPL_TIME, "%s %Tu %ld :%s", "391" },
+/* 392 */
+  { 0 },
+/* 393 */
+  { 0 },
+/* 394 */
+  { 0 },
+/* 395 */
+  { 0 },
+/* 396 */
+  { RPL_HOSTHIDDEN, "%s :is now your hidden host", "396" },
+/* 397 */
+  { 0 },
+/* 398 */
+  { 0 },
+/* 399 */
+  { 0 },
+/* 400 */
+  { 0 },
+/* 401 */
+  { ERR_NOSUCHNICK, "%s :No such nick", "401" },
+/* 402 */
+  { ERR_NOSUCHSERVER, "%s :No such server", "402" },
+/* 403 */
+  { ERR_NOSUCHCHANNEL, "%s :No such channel", "403" },
+/* 404 */
+  { ERR_CANNOTSENDTOCHAN, "%s :Cannot send to channel", "404" },
+/* 405 */
+  { ERR_TOOMANYCHANNELS, "%s :You have joined too many channels", "405" },
+/* 406 */
+  { ERR_WASNOSUCHNICK, "%s :There was no such nickname", "406" },
+/* 407 */
+  { ERR_TOOMANYTARGETS, "%s :Duplicate recipients. No message delivered", "407" },
+/* 408 */
+  { 0 },
+/* 409 */
+  { ERR_NOORIGIN, ":No origin specified", "409" },
+/* 410 */
+  { ERR_UNKNOWNCAPCMD, "%s :Unknown CAP subcommand", "410" },
+/* 411 */
+  { ERR_NORECIPIENT, ":No recipient given (%s)", "411" },
+/* 412 */
+  { ERR_NOTEXTTOSEND, ":No text to send", "412" },
+/* 413 */
+  { ERR_NOTOPLEVEL, "%s :No toplevel domain specified", "413" },
+/* 414 */
+  { ERR_WILDTOPLEVEL, "%s :Wildcard in toplevel Domain", "414" },
+/* 415 */
+  { 0 },
+/* 416 */
+  { ERR_QUERYTOOLONG, "%s :Too many lines in the output, restrict your query", "416" },
+/* 417 */
+  { ERR_INPUTTOOLONG, ":Input line was too long", "417" },
+/* 418 */
+  { 0 },
+/* 419 */
+  { 0 },
+/* 420 */
+  { 0 },
+/* 421 */
+  { ERR_UNKNOWNCOMMAND, "%s :Unknown command", "421" },
+/* 422 */
+  { ERR_NOMOTD, ":MOTD File is missing", "422" },
+/* 423 */
+  { ERR_NOADMININFO, "%s :No administrative info available", "423" },
+/* 424 */
+  { 0 },
+/* 425 */
+  { 0 },
+/* 426 */
+  { 0 },
+/* 427 */
+  { 0 },
+/* 428 */
+  { 0 },
+/* 429 */
+  { 0 },
+/* 430 */
+  { 0 },
+/* 431 */
+  { ERR_NONICKNAMEGIVEN, ":No nickname given", "431" },
+/* 432 */
+  { ERR_ERRONEUSNICKNAME, "%s :Erroneous Nickname", "432" },
+/* 433 */
+  { ERR_NICKNAMEINUSE, "%s :Nickname is already in use.", "433" },
+/* 434 */
+  { 0 },
+/* 435 */
+  { 0 },
+/* 436 */
+  { ERR_NICKCOLLISION, "%s :Nickname collision KILL", "436" },
+/* 437 */
+  { ERR_BANNICKCHANGE, "%s :Cannot change nickname while banned on channel or channel is moderated", "437" },
+/* 438 */
+  { ERR_NICKTOOFAST, "%s :Nick change too fast. Please wait %d seconds.", "438" },
+/* 439 */
+  { ERR_TARGETTOOFAST, "%s :Target change too fast. Please wait %d seconds.", "439" },
+/* 440 */
+  { ERR_SERVICESDOWN, "%s :Services are currently unavailable.", "440" },
+/* 441 */
+  { ERR_USERNOTINCHANNEL, "%s %s :They aren't on that channel", "441" },
+/* 442 */
+  { ERR_NOTONCHANNEL, "%s :You're not on that channel", "442" },
+/* 443 */
+  { ERR_USERONCHANNEL, "%s %s :is already on channel", "443" },
+/* 444 */
+  { 0 },
+/* 445 */
+  { 0 },
+/* 446 */
+  { 0 },
+/* 447 */
+  { 0 },
+/* 448 */
+  { 0 },
+/* 449 */
+  { 0 },
+/* 450 */
+  { 0 },
+/* 451 */
+  { ERR_NOTREGISTERED, ":You have not registered", "451" },
+/* 452 */
+  { 0 },
+/* 453 */
+  { 0 },
+/* 454 */
+  { 0 },
+/* 455 */
+  { 0 },
+/* 456 */
+  { 0 },
+/* 457 */
+  { 0 },
+/* 458 */
+  { 0 },
+/* 459 */
+  { 0 },
+/* 460 */
+  { 0 },
+/* 461 */
+  { ERR_NEEDMOREPARAMS, "%s :Not enough parameters", "461" },
+/* 462 */
+  { ERR_ALREADYREGISTRED, ":You may not reregister", "462" },
+/* 463 */
+  { ERR_NOPERMFORHOST, ":Your host isn't among the privileged", "463" },
+/* 464 */
+  { ERR_PASSWDMISMATCH, ":Password Incorrect", "464" },
+/* 465 */
+  { ERR_YOUREBANNEDCREEP, ":You are banned from this server", "465" },
+/* 466 */
+  { ERR_YOUWILLBEBANNED, "", "466" },
+/* 467 */
+  { ERR_KEYSET, "%s :Channel key already set", "467" },
+/* 468 */
+  { ERR_INVALIDUSERNAME, 0, "468" },
+/* 469 */
+  { 0 },
+/* 470 */
+  { 0 },
+/* 471 */
+  { ERR_CHANNELISFULL, "%s :Cannot join channel (+l)", "471" },
+/* 472 */
+  { ERR_UNKNOWNMODE, "%c :is unknown mode char to me", "472" },
+/* 473 */
+  { ERR_INVITEONLYCHAN, "%s :Cannot join channel (+i)", "473" },
+/* 474 */
+  { ERR_BANNEDFROMCHAN, "%s :Cannot join channel (+b)", "474" },
+/* 475 */
+  { ERR_BADCHANNELKEY, "%s :Cannot join channel (+k)", "475" },
+/* 476 */
+  { ERR_BADCHANMASK, "%s :Bad Channel Mask", "476" },
+/* 477 */
+  { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+r): this channel requires authentication -- you can obtain an account from %s", "477" },
+/* 478 */
+  { ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full", "478" },
+/* 479 */
+  { ERR_BADCHANNAME, "%s :Cannot join channel (access denied on this server)", "479" },
+/* 480 */
+  { 0 },
+/* 481 */
+  { ERR_NOPRIVILEGES, ":Permission Denied: Insufficient privileges", "481" },
+/* 482 */
+  { ERR_CHANOPRIVSNEEDED, "%s :You're not channel operator", "482" },
+/* 483 */
+  { ERR_CANTKILLSERVER, ":You cant kill a server!", "483" },
+/* 484 */
+  { ERR_ISCHANSERVICE, "%s %s :Cannot kill, kick or deop a network service", "484" },
+/* 485 */
+  { 0 },
+/* 486 */
+  { 0 },
+/* 487 */
+  { 0 },
+/* 488 */
+  { 0 },
+/* 489 */
+  { ERR_VOICENEEDED, "%s :You're neither voiced nor channel operator", "489" },
+/* 490 */
+  { 0 },
+/* 491 */
+  { ERR_NOOPERHOST, ":No Operator block for your host", "491" },
+/* 492 */
+  { 0 },
+/* 493 */
+  { ERR_NOFEATURE, "%s :No such feature", "493" },
+/* 494 */
+  { ERR_BADFEATVALUE, "%s :Bad value for feature %s", "494" },
+/* 495 */
+  { ERR_BADLOGTYPE, "%s :No such log type", "495" },
+/* 496 */
+  { ERR_BADLOGSYS, "%s :No such log subsystem", "496" },
+/* 497 */
+  { ERR_BADLOGVALUE, "%s :Bad value for log type", "497" },
+/* 498 */
+  { ERR_ISOPERLCHAN, "%s %s :Cannot kick or deop an IRC Operator on a local channel", "498" },
+/* 499 */
+  { 0 },
+/* 500 */
+  { 0 },
+/* 501 */
+  { ERR_UMODEUNKNOWNFLAG, "%c :Unknown user MODE flag", "501" },
+/* 502 */
+  { ERR_USERSDONTMATCH, ":Cant change mode for other users", "502" },
+/* 503 */
+  { 0 },
+/* 504 */
+  { 0 },
+/* 505 */
+  { 0 },
+/* 506 */
+  { 0 },
+/* 507 */
+  { 0 },
+/* 508 */
+  { 0 },
+/* 509 */
+  { 0 },
+/* 510 */
+  { 0 },
+/* 511 */
+  { ERR_SILELISTFULL, "%s :Your silence list is full", "511" },
+/* 512 */
+  { ERR_NOSUCHGLINE, "%s :No such gline", "512" },
+/* 513 */
+  { ERR_BADPING, 0, "513" },
+/* 514 */
+  { ERR_NOSUCHJUPE, "%s :No such jupe", "514" },
+/* 515 */
+  { ERR_BADEXPIRE, "%Tu :Bad expire time", "515" },
+/* 516 */
+  { ERR_DONTCHEAT, "%s :Don't Cheat.", "516" },
+/* 517 */
+  { ERR_DISABLED, "%s :Command disabled.", "517" },
+/* 518 */
+  { ERR_LONGMASK, ":Mask is too long", "518" },
+/* 519 */
+  { ERR_TOOMANYUSERS, "%d :Too many users affected by mask", "519" },
+/* 520 */
+  { ERR_MASKTOOWIDE, "%s :Mask is too wide", "520" },
+/* 521 */
+  { 0 },
+/* 522 */
+  { 0 },
+/* 523 */
+  { 0 },
+/* 524 */
+  { ERR_QUARANTINED, "%s :Channel is quarantined : %s", "524" },
+/* 525 */
+  { ERR_INVALIDKEY, "%s :Key is not well-formed", "525" },
+/* 526 */
+  { 0 },
+/* 527 */
+  { 0 },
+/* 528 */
+  { 0 },
+/* 529 */
+  { 0 },
+/* 530 */
+  { 0 },
+/* 531 */
+  { 0 },
+/* 532 */
+  { 0 },
+/* 533 */
+  { 0 },
+/* 534 */
+  { 0 },
+/* 535 */
+  { 0 },
+/* 536 */
+  { 0 },
+/* 537 */
+  { 0 },
+/* 538 */
+  { 0 },
+/* 539 */
+  { 0 },
+/* 540 */
+  { 0 },
+/* 541 */
+  { 0 },
+/* 542 */
+  { 0 },
+/* 543 */
+  { 0 },
+/* 544 */
+  { 0 },
+/* 545 */
+  { 0 },
+/* 546 */
+  { 0 },
+/* 547 */
+  { 0 },
+/* 548 */
+  { 0 },
+/* 549 */
+  { 0 },
+/* 550 */
+  { 0 },
+/* 551 */
+  { 0 },
+/* 552 */
+  { 0 },
+/* 553 */
+  { 0 },
+/* 554 */
+  { 0 },
+/* 555 */
+  { 0 },
+/* 556 */
+  { 0 },
+/* 557 */
+  { 0 },
+/* 558 */
+  { 0 },
+/* 559 */
+  { 0 },
+/* 560 */
+  { ERR_NOTLOWEROPLEVEL, "%s %s %hu %hu :Cannot %s someone with %s op-level", "560" },
+/* 561 */
+  { ERR_NOTMANAGER, "%s :You must be channel Admin to add or remove a password. Use /JOIN %s <AdminPass>.", "561" },
+/* 562 */
+  { ERR_CHANSECURED, "%s :Channel is older than 48 hours and secured. Cannot change Admin pass anymore", "562" },
+/* 563 */
+  { ERR_UPASSSET, "%s :Cannot remove Admin pass (+A) while User pass (+U) is still set. First use /MODE %s -U <userpass>", "563" },
+/* 564 */
+  { ERR_UPASSNOTSET, "%s :Cannot set user pass (+U) until Admin pass (+A) is set. First use /MODE %s +A <adminpass>", "564" },
+/* 565 */
+  { 0 },
+/* 566 */
+  { ERR_NOMANAGER, "%s :Re-create the channel. The channel must be completely empty for a period of %s before it can be recreated.", "566" },
+/* 567 */
+  { ERR_UPASS_SAME_APASS, "%s :Cannot use the same pass for both admin (+A) and user (+U) pass.", "567" },
+/* 568 */
+  { 0 },
+/* 569 */
+  { 0 },
+/* 570 */
+  { 0 },
+/* 571 */
+  { 0 },
+/* 572 */
+  { 0 },
+/* 573 */
+  { 0 },
+/* 574 */
+  { 0 },
+/* 575 */
+  { 0 },
+/* 576 */
+  { 0 },
+/* 577 */
+  { 0 },
+/* 578 */
+  { 0 },
+/* 579 */
+  { 0 },
+/* 580 */
+  { 0 },
+/* 581 */
+  { 0 },
+/* 582 */
+  { 0 },
+/* 583 */
+  { 0 },
+/* 584 */
+  { 0 },
+/* 585 */
+  { 0 },
+/* 586 */
+  { 0 },
+/* 587 */
+  { 0 },
+/* 588 */
+  { 0 },
+/* 589 */
+  { 0 },
+/* 590 */
+  { 0 },
+/* 591 */
+  { 0 },
+/* 592 */
+  { 0 },
+/* 593 */
+  { 0 },
+/* 594 */
+  { 0 },
+/* 595 */
+  { 0 },
+/* 596 */
+  { 0 },
+/* 597 */
+  { 0 },
+/* 598 */
+  { 0 },
+/* 599 */
+  { 0 }
+};
+
+/** Return a pointer to the Numeric for a particular code.
+ * @param n %Numeric to look up.
+ * @return Numeric structure.
+ */
+const struct Numeric* get_error_numeric(int n)
+{
+  assert(0 < n);
+  assert(n < ERR_LASTERROR);
+  assert(0 != replyTable[n].value);
+
+  return &replyTable[n];
+}
+
+/** Return a format string for a numeric response.
+ * @param n %Numeric to look up.
+ * @return Pointer to a static buffer containing the format string.
+ */
+char* rpl_str(int n)
+{
+  static char numbuff[512];
+  Numeric* p;
+
+  assert(0 < n);
+  assert(n < ERR_LASTERROR);
+  assert(0 != replyTable[n].value);
+
+  p = &replyTable[n];
+  strcpy(numbuff, ":%s 000 %s ");
+  if (p->str) {
+    numbuff[4] = p->str[0];
+    numbuff[5] = p->str[1];
+    numbuff[6] = p->str[2];
+    strcpy(numbuff + 11, p->format);
+  }
+
+  return numbuff;
+}
+