//! Enumeration of all the possible server responses. #![allow(non_camel_case_types)] use std::mem::transmute; use std::str::FromStr; use client::data::message::Message; /// List of all server responses as defined in [RFC 2812](http://tools.ietf.org/html/rfc2812). /// All commands are documented with their expected form from the RFC. #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u16)] pub enum Response { // Expected replies /// 001 Welcome to the Internet Relay Network !@ RPL_WELCOME = 001, /// 002 Your host is , running version RPL_YOURHOST = 002, /// 003 This server was created RPL_CREATED = 003, /// 004 available channel modes> RPL_MYINFO = 004, /// 005 Try server , port RPL_BOUNCE = 005, /// 302 :*1 *( " " ) RPL_USERHOST = 302, /// 303 :*1 *( " " ) RPL_ISON = 303, /// 301 : RPL_AWAY = 301, /// 305 :You are no longer marked as being away RPL_UNAWAY = 305, /// 306 :You have been marked as being away RPL_NOWAWAY = 306, /// 311 * : RPL_WHOISUSER = 311, /// 312 : RPL_WHOISSERVER = 312, /// 313 :is an IRC operator RPL_WHOISOPERATOR = 313, /// 317 :seconds idle RPL_WHOISIDLE = 317, /// 318 :End of WHOIS list RPL_ENDOFWHOIS = 318, /// 319 :*( ( "@" / "+" ) " " ) RPL_WHOISCHANNELS = 319, /// 314 * : RPL_WHOWASUSER = 314, /// 369 :End of WHOWAS RPL_ENDOFWHOWAS = 369, /// Obsolete. Not used. RPL_LISTSTART = 321, /// 322 <# visible> : RPL_LIST = 322, /// 323 :End of LIST RPL_LISTEND = 323, /// 325 RPL_UNIQOPIS = 325, /// 324 RPL_CHANNELMODEIS = 324, /// 331 :No topic is set RPL_NOTOPIC = 331, /// 332 : RPL_TOPIC = 332, /// 341 RPL_INVITING = 341, /// 342 :Summoning user to IRC RPL_SUMMONING = 342, /// 346 RPL_INVITELIST = 346, /// 347 :End of channel invite list RPL_ENDOFINVITELIST = 347, /// 348 RPL_EXCEPTLIST = 348, /// 349 :End of channel exception list RPL_ENDOFEXCEPTLIST = 349, /// 351 . : RPL_VERSION = 351, /// 352 ( "H" / "G" > ["*"] [ ( "@" / "+" ) ] /// : RPL_WHOREPLY = 352, /// 315 :End of WHO list RPL_ENDOFWHO = 315, /// 353 ( "=" / "*" / "@" ) :[ "@" / "+" ] *( " " [ "@" / "+" ] ) RPL_NAMREPLY = 353, /// 366 :End of NAMES list RPL_ENDOFNAMES = 366, /// 364 : RPL_LINKS = 364, /// 365 :End of LINKS list RPL_ENDOFLINKS = 365, /// 367 RPL_BANLIST = 367, /// 368 :End of channel ban list RPL_ENDOFBANLIST = 368, /// 371 : RPL_INFO = 371, /// 374 :End of INFO list RPL_ENDOFINFO = 374, /// 375 :- Message of the day - RPL_MOTDSTART = 375, /// 372 :- RPL_MOTD = 372, /// 376 :End of MOTD command RPL_ENDOFMOTD = 376, /// 381 :You are now an IRC operator RPL_YOUREOPER = 381, /// 382 :Rehashing RPL_REHASHING = 382, /// 383 You are service RPL_YOURESERVICE = 383, /// 391 : RPL_TIME = 391, /// 392 :UserID Terminal Host RPL_USERSSTART = 392, /// 393 : RPL_USERS = 393, /// 394 :End of users RPL_ENDOFUSERS = 394, /// 395 :Nobody logged in RPL_NOUSERS = 395, /// 200 Link V /// RPL_TRACELINK = 200, /// 201 Try. RPL_TRACECONNECTING = 201, /// 202 H.S. RPL_TRACEHANDSHAKE = 202, /// 203 ???? [] RPL_TRACEUKNOWN = 203, /// 204 Oper RPL_TRACEOPERATOR = 204, /// 205 User RPL_TRACEUSER = 205, /// 206 Serv S C @ V RPL_TRACESERVER = 206, /// 207 Service RPL_TRACESERVICE = 207, /// 208 0 RPL_TRACENEWTYPE = 208, /// 209 Class RPL_TRACECLASS = 209, /// Unused. RPL_TRACERECONNECT = 210, /// 261 File RPL_TRACELOG = 261, /// 262 :End of TRACE RPL_TRACEEND = 262, /// 211 ///