IRC: Client Protocol -------------------- Abstract The IRC (Internet Relay Chat) protocol is for use with text based conferencing; the simplest client being any socket program capable of connecting to the server. This document defines the Client Protocol, and assumes that the reader is familiar with the IRC Architecture [IRC-ARCH]. 1. Labels This section defines the identifiers used for the various components of the IRC protocol. 1.1 Servers Servers are uniquely identified by their name. See the protocol grammar rules (section 2.3.1) for what may and may not be used in a server name. 1.2 Clients For each client all servers MUST have the following information: a net-wide unique identifier (whose format depends on the type of client) and the server which introduced the client. 1.2.1 Users Each user is distinguished from other users by a unique nickname having a maximum length of characters defined in RPL_ISUPPORT's NICKLEN token. A recommended value is twelve (12) characters, but note that a network may negotiate a different length, and a dangerous caveat is that some server sofware implementations may allow a longer length name than is specified in NICKLEN, though this behaviour SHOULD NOT be used. The maximum length of a nickname MUST be no less than nine (9). See the protocol grammar rules (section 2.3.1) for what may and may not be used in a nickname. 1.2.1.1 Operators To allow a reasonable amount of order to be kept within the IRC network, a special class of users (operators) is allowed to perform general maintenance functions on the network. These functions may be controversial and dangerous to the network, but are generally necessary. Some examples of power that an Operator may have (though this is by no means an exhaustive list) is that of connecting and disconnecting additional servers to the network, and removing a troublesome user from the connected network by 'force', i.e., operators are able to close the connection between any client and server. For further details on this type of action, see section 3.7.1 (KILL). 1.3 Channels Channels names are strings which begin with an identifying character which implies which type of channel it is. Valid identifying characters differ from implementation to implementation, and are given in the RPL_ISUPPORT CHANTYPES token. Each prefix characterizes a different channel type. The total length of a channel name may vary from network to network, and is dictated by RPL_ISUPPORT's CHANNELLEN token. A recommended value is fifty (50) characters, though a network may allow a longer length. The only restriction on a channel name is that it SHALL NOT contain any spaces (' '), a control G (^G or ASCII 7), a comma (','). Space is used as parameter separator and comma is used as a list item separator by the protocol). Channel names are case insensitive. See the protocol grammar rules (section 2.3.1) for the exact syntax of a channel name. The definition of the channel types is not relevant to the client-server protocol and thus it is beyond the scope of this document. More details can be found in "Internet Relay Chat: Channel Management" [IRC-CHAN]. 2. The IRC Client Specification 2.1 Overview The protocol as described herein is for use only with client to server connections. 2.2 Character codes No specific character set is specified. The protocol is based on a set of codes which are composed of eight (8) bits, making up an octet. Each message may be composed of any number of these octets; however, some octet values are used for control codes, which act as message delimiters. In previous evolutions of the IRC protocol, there was a requirement for the use of Scandinavian casemapping to determine the equivilance of nicknames and channels. This is counterproductive and creates confusion and complexity, and SHOULD NOT be used. Scandinavian casemapping should be phased out in favour of ASCII casemapping. 2.3 Messages Servers and clients send each other messages, which may or may not generate a reply. Clients are however not advised to wait forever for this reply; client to server and server to server communication is essentially asynchronous by nature. Each IRC message may consist of up to three main parts: the prefix (OPTIONAL), the command, and the command parameters. Each command can take a certain maximum of parameters, traditionally 15. This is implementation dependant. Clients MUST use the value given in RPL_ISUPPORT token MAXPARA. A recommended value is thirty two (32). The prefix, command, and all parameters are separated by one ASCII space character (0x20) each. The presence of a prefix is indicated with a single leading ASCII colon character (':', 0x3b), which MUST be the first character of the message itself. There MUST be NO gap (whitespace) between the colon and the prefix. The prefix is used by servers to indicate the true origin of the message. If the prefix is missing from the message, it is assumed to have originated from the connection from which it was received from. Clients MUST NOT use a prefix when sending a message. The command MUST either be an alphabetical command, or a number (known as a numeric) not exceeding 2147483647 (0x7FFFFFFF), and represented in ASCII text. Numerics less than 100 MUST be prepended with leading zeroes to make the code 3 digits long; other numerics MUST NOT be prepended. See section 2.4 for more detailed coverage of numerics. IRC messages are always lines of characters terminated with a CR-LF (Carriage Return - Line Feed) pair, and these messages SHALL NOT exceed 512 characters in length, counting all characters including the trailing CR-LF. Thus, there are 510 characters maximum allowed for the command and its parameters. There is no provision for continuation of message lines. If an IRC message exceeds 510 bytes, it MUST be truncated at 510 bytes, with a CR-LF appended, taking the total length to 512. 2.3.1 Message format in Augmented BNF The protocol messages must be extracted from the contiguous stream of octets. The current solution is to designate two characters, CR and LF, as message separators. Empty messages are silently ignored, which permits use of the sequence CR-LF between messages without extra problems. The extracted message is parsed into the components , and list of parameters (). The Augmented BNF representation for this is: message = [ ":" prefix SPACE ] command [ params ] crlf prefix = servername / ( nickname [ "!" user "@" host ] ) / ( nickname "@" host ) ; Normal prefixes are servername and ; nickname "!" user "@" host for messages from servers ; and clients, respectively. A prefix of only a nickname ; MAY be used for a client changing their own user mode and ; SHOULD NOT be used in any other case. ; Clients SHOULD treat prefixes of the form nickname "@" host ; as entities named the entire prefix. nickname = ( letter / digit / special ) *( letter / digit / special / "-" ) ; additional restrictions above user = 1*( %x01-09 / %x0B-0C / %x0E-1F / %x21-3F / %x41-FF ) ; any octet except NUL, CR, LF, " " and "@" ; servers MAY restrict this further servername = [ ( "*" / shortname ) 1*( "." [ shortname ] ) ; names starting with "*" are used for server ; hostmasking and hiding. shortname = ( letter / digit ) *( letter / digit / "-" ) *( letter / digit ) host = hostchar *( hostchar / "-" / "." / ":") hostchar = "_" / "/" / digit / letter command = 1*letter / 3digit / ( %x31-39 3*digit ) params = *14( SPACE middle ) [ SPACE ":" trailing ] =/ 14( SPACE middle ) [ SPACE [ ":" ] trailing ] nospcrlfcl = %x01-09 / %x0B-0C / %x0E-1F / %x21-39 / %x3B-FF ; any octet except NUL, CR, LF, " " and ":" middle = nospcrlfcl *( ":" / nospcrlfcl ) trailing= *( ":" / " " / nospcrlfcl ) SPACE= %x20 ; space character crlf = %x0D %x0A; "carriage return" "linefeed" NOTES: 1) After extracting the parameter list, all parameters are equal whether matched by or . is just a syntactic trick to allow SPACE within the parameter. 2) The NUL (%x00) character is not special in message framing, and basically could end up inside a parameter, but it would create extra complexities in normal C string handling. Therefore, NUL is not allowed within messages. Most protocol messages specify additional semantics and syntax for the extracted parameter strings dictated by their position in the list. 3) Hostname has a maximum length of 63 characters. This is a limitation of the protocol as internet hostnames (in particular) can be longer. Such restriction is necessary because IRC messages are limited to 512 characters in length. Clients connecting from a host which name is longer than 63 characters are registered using the host (numeric) address instead of the host name. Some other parameter syntaxes are: key = 1*23( %x01-05 / %x07-08 / %x0C / %x0E-1F / %x21-2B / %x2D-39 / %x3B-7F ) ; any 7-bit US_ASCII character, ; except NUL, CR, LF, FF, h/v TABs, " ", "," and ":" timestamp = "0" / ( %x31-39 *digit ) ; Decimal representation of Unix timestamp ; (number of seconds since 1 Jan 1970 00:00:00 UTC) ; The value 0 sometimes has a special meaning. setter = servername / ( nickname [ "!" user "@" host ] ) ; Who set a ban, topic, etc. ; Servers may mix the various forms freely. msgto = channel / schannel / nickname / targetmask / directedmsg msgto =/ "*" channel = chantype *( %x01-06 / %x08-09 / %x0B-0C / %x0E-1F / %x21-2B / %x2D-FF ) chantype = schannel = statusmsgchar channel statusmsgchar = targetmask = "$" 1*( %x01-09 / %x0B-0C / %x0E-1F / %x21-2B / %x2D-FF ) ; syntax of the latter part undefined directedmsg = user [ "%" host ] "@" servername isupport = [ ":" servername SPACE ] "005" SPACE nick SPACE 1*13( token SPACE ) ":are supported by this server" ; RPL_ISUPPORT numeric, entire line tokens = 1*13( token SPACE ) token = *1"-" isupportparam / isupportparam *1( "=" isupportvalue ) ; For RPL_ISUPPORT numeric isupportparam = 1*20( letter / digit ) isupportvalue = *( letter / digit / punct ) target = 1*( letter / digit / special / "-" / "." / "*" / "?") ; nickname or servername with wildcards (see section 3.4) letter = %x41-5A / %x61-7A ; A-Z / a-z digit = %x30-39 ; 0-9 hexdigit = digit / "A" / "B" / "C" / "D" / "E" / "F" special = %x5B-60 / %x7B-7D ; "[", "]", "\", "`", "_", "^", "{", "|", "}" punct = %d33-47 / %d58-64 / %d91-96 / %d123-126 2.4 Numeric replies Most of the messages sent to the server generate a reply of some sort. The most common reply is the numeric reply, used for both errors and normal replies. The numeric reply MUST be sent as one message consisting of the sender prefix, the numeric, and the target of the reply. A numeric reply is not allowed to originate from a client. In all other respects, a numeric reply is just like a normal message, except that the keyword is made up exclusively of digits rather than a string of letters. A list of different replies is supplied in section 5 (Replies). 2.5 Wildcard expressions When wildcards are allowed in a string, it is referred as a "mask". For string matching purposes, the protocol allows the use of two special characters: '?' (%x3F) to match one and only one character, and '*' (%x2A) to match any number of any characters. Some implementations treat the character '\' (%x5C) specially, see section 7.2. This is not recommended. Examples: a?c Matches any string of 3 characters in length starting with "a" and ending with "c" a*c Matches any string of at least 2 characters in length starting with "a" and ending with "c" 3. Message Details On the following pages there are descriptions of each message recognized by the IRC server and client. All commands described in this section MUST be implemented by any server for this protocol. The server to which a client is connected SHOULD parse the complete message, and return any appropriate errors. If multiple parameters is presented, then each MUST be checked for validity and appropriate responses MUST be sent back to the client. In the case of incorrect messages which use parameter lists with comma as an item separator, a reply MUST be sent for each item. 3.1 Connection Registration The commands described here are used to register a connection with an IRC server as a user as well as to correctly disconnect. A "PASS" command is not required for a client connection to be registered, but it MUST precede the latter of the NICK/USER combination. The order for a client to register is as follows: Pass message Nick message User message Upon success, the client will receive a series of numerics including RPL_WELCOME indicating that the connection is now registered and known the to the entire IRC network. 3.1.1 Password message Command: PASS Parameters: The PASS command is used to set a 'connection password'. The optional password can and MUST be set before any attempt to register the connection is made. This requires that user send a PASS command before sending the NICK/USER combination. Numeric Replies: ERR_NEEDMOREPARAMS ERR_ALREADYREGISTRED Example: PASS secretpasswordhere 3.1.2 Nick message Command: NICK Parameters: The NICK command is used to give user a nickname or change the existing one. If sent by a client, it is a request that may or may not be granted by the server. Nicknames starting with a digit are reserved for special purposes (e.g. resolving nick collisions); clients SHOULD NOT send them in a NICK command. A server MAY forcibly change a client's nickname by sending NICK messages as if the client sent a NICK command. To know its initial nickname (which MAY be different from the one requested), a client SHOULD use the target field in the RPL_WELCOME numeric. Numeric Replies: ERR_NONICKNAMEGIVEN ERR_ERRONEUSNICKNAME ERR_NICKNAMEINUSE ERR_UNAVAILRESOURCE ERR_RESTRICTED Examples: NICK Wiz Introducing new nick "Wiz" if session is still unregistered, or user changing his nickname to "Wiz" :WiZ!jto@tolsun.oulu.fi NICK Kilroy Server telling that WiZ changed his nickname to Kilroy. :jilles!~jilles@this.is.a.spoof NICK 1JJAAAAAC Server forcibly changing jilles's nickname to 1JJAAAAAC. 3.1.3 User message Command: USER Parameters: The USER command is used at the beginning of connection to specify the username, hostname and realname of a new user. The parameter must be an ASCII string of modes to apply to the client on connect. Both the adding (‘+’) and removing (‘-‘) of modes is to be supported by this field. Replies produced by the processing of this field must reflect replies given by the MODE message. Interpretation of this field by the server is OPTIONAL. If the content of the parameter is a recognised server hostname, it should be accepted as the server name the user is connecting to. The behaviour due to this is determined by server software and may vary between simple changes to messages to full virtual hosting. Support for virtual hosting is optional, and if the value is not recognised as a server name or the server does not support virtual hosting, a default server name must be used. The may contain space characters. Numeric Replies: ERR_NEEDMOREPARAMS ERR_ALREADYREGISTRED Example: USER guest 0 * :Ronnie Reagan User registering themselves with a username of "guest" and real name "Ronnie Reagan". USER guest +i-w * :Ronnie Reagan User registering themselves with a username of "guest" and real name "Ronnie Reagan", and asking to be set invisible, and to not receive wallops. USER viroteck +i svn.viroteck.net :Master of all trades; jack of none User registering themselves with a username of “viroteck”, a realname of “Master of all trades; jack of none”, asking to be set invisible and to connect to virtual server svn.viroteck.net. 3.1.4 Oper message Command: OPER Parameters: A normal user uses the OPER command to obtain operator privileges. The combination of and are REQUIRED to gain Operator privileges. Upon success, the user will receive a MODE message (see section 3.1.5) indicating the new user modes. Additional measures MAY be used in addition to a password, such as an SSL fingerprint, but servers SHOULD require a password in addition to other such measures. Numeric Replies: ERR_NEEDMOREPARAMS RPL_YOUREOPER ERR_NOOPERHOST ERR_PASSWDMISMATCH Example: OPER foo bar Attempt to register as an operator using a username of "foo" and "bar" as the password. 3.1.5 User mode message Command: MODE Parameters: *( ( "+" / "-" ) *( "i" / "w" / "o" ) ) The user MODE's are typically changes which affect either how the client is seen by others or what 'extra' messages the client is sent. A user MODE command MUST only be accepted if both the sender of the message and the nickname given as a parameter are both the same. If no other parameter is given, then the server will return the current settings for the nick. Otherwise, it is a request to change the user mode; the server will send a MODE message back with the effective changes, if any, and an error message, if any. (This means that it is possible to get no reply at all.) Note that other user modes MAY exist. Their existance is generally implementation defined, however they MUST be given in RPL_MYINFO. 3.1.5.1 Available modes i Marks a user as invisible w User receives wallops o Operator flag s Marks a user for receipt of server notices. Additional modes MAY be added as required by the implementation. If a user attempts to make themselves an operator using the "+o" flag, the attempt SHOULD be ignored as users could bypass the authentication mechanisms of the OPER command. There is no restriction, however, on anyone `deopering' themselves (using "-o"). The flag 's' is different in implementation from other modes. See FIXME SNOMASKS. Numeric Replies: ERR_NEEDMOREPARAMS ERR_USERSDONTMATCH ERR_UMODEUNKNOWNFLAG RPL_UMODEIS Examples: MODE WiZ -w Command by WiZ to turn off reception of WALLOPS messages. MODE Angel +i Command from Angel to make herself invisible. MODE WiZ -o WiZ 'deopering' (removing operator status). 3.1.6 Away Command: AWAY Parameters: [ ] With the AWAY command, clients can set an automatic reply string for any PRIVMSG commands directed at them (not to a channel they are on). The server sends an automatic reply to the client sending the PRIVMSG command. The only replying server is the one to which the sending client is connected to. The AWAY command is used either with one non-empty parameter, to set an AWAY message, or with no parameters, to remove the AWAY message. Numeric Replies: RPL_UNAWAY RPL_NOWAWAY Example: AWAY :Gone to lunch. Back in 5 ; Command to set away message to "Gone to lunch. Back in 5". 3.1.7 Quit Command: QUIT Parameters: [ ] A client session is terminated with a quit message. The server acknowledges this by sending an ERROR message to the client. Numeric Replies: None. Example: QUIT :Gone to have lunch Preferred message format. :syrk!kalt@millennium.stealth.net QUIT :Gone to have lunch User syrk has quit IRC to have lunch. 3.1.8 Squit Command: SQUIT Parameters: The SQUIT command is available only to operators. It is used to disconnect server links. More precisely, it is a command to the last server on the path from the operator to the given server to disconnect it. The effect of executing a SQUIT with the operator's own server is undefined. The SHOULD be supplied by all operators who execute a SQUIT for a remote server. The server ordered to disconnect its peer generates a WALLOPS message with included, both for accountability purposes and so that other users remain informed. Numeric replies: ERR_NOPRIVILEGES ERR_NOSUCHSERVER ERR_NEEDMOREPARAMS Examples: SQUIT tolsun.oulu.fi :Bad Link Command to uplink of the server tolson.oulu.fi to terminate its connection with comment "Bad Link". 3.2 Channel operations This group of messages is concerned with manipulating channels, their properties (channel modes), and their contents (typically users). All of these messages are requests which will or will not be granted by the server. The server MUST send a reply informing the user whether the request was granted, denied or generated an error. When the server grants the request, the message is typically sent back (eventually reformatted) to the user with the prefix set to the user itself. The rules governing how channels are managed are enforced by the servers. These rules are beyond the scope of this document. More details are found in "Internet Relay Chat: Channel Management" [IRC-CHAN]. 3.2.1 Join message Command: JOIN Parameters: ( *( "," ) [ *( "," ) ] ) The JOIN command is used by a user to request to start listening to the specific channel. Servers MUST be able to parse arguments in the form of a list of target, but MUST NOT use lists when sending JOIN messages to clients. Once a user has joined a channel, he receives information about all commands his server receives affecting the channel. This includes JOIN, MODE, KICK, PART, QUIT and of course PRIVMSG/NOTICE. This allows channel members to keep track of the other channel members, as well as channel modes. If a JOIN is successful, the user receives a JOIN message as confirmation and is then sent the channel's topic (using RPL_TOPIC) and the list of users who are on the channel (using RPL_NAMREPLY), which MUST include the user joining. Numeric Replies: ERR_NEEDMOREPARAMS ERR_BANNEDFROMCHAN ERR_INVITEONLYCHAN ERR_BADCHANNELKEY ERR_BADCHANNAME ERR_CHANNELISFULL ERR_BADCHANMASK ERR_NOSUCHCHANNEL ERR_TOOMANYCHANNELS ERR_TOOMANYTARGETS ERR_UNAVAILRESOURCE RPL_TOPIC RPL_TOPICWHOTIME Examples: JOIN #foobar Command to join channel #foobar. JOIN &foo fubar Command to join channel &foo using key "fubar". JOIN #foo,&bar fubar Command to join channel #foo using key "fubar" and &bar using no key. JOIN #foo,#bar fubar,foobar Command to join channel #foo using key "fubar", and channel #bar using key "foobar". JOIN #foo,#bar Command to join channels #foo and #bar. :WiZ!jto@tolsun.oulu.fi JOIN #Twilight_zone JOIN message from WiZ on channel #Twilight_zone 3.2.2 Part message Command: PART Parameters: *( "," ) [ ] The PART command causes the user sending the message to be removed from the list of active members for all given channels listed in the parameter string. If a "Part Message" is given, this will be sent instead of the default message. This request is always granted by the server. Servers MUST be able to parse arguments in the form of a list of targets, separated by a comma (‘,’), but MUST NOT use lists when sending PART messages to clients. Numeric Replies: ERR_NEEDMOREPARAMS ERR_NOSUCHCHANNEL ERR_NOTONCHANNEL Examples: PART #twilight_zone Command to leave channel "#twilight_zone" PART #oz-ops,&group5 Command to leave both channels "&group5" and "#oz-ops". :WiZ!jto@tolsun.oulu.fi PART #playzone :I lost User WiZ leaving channel "#playzone" with the message "I lost". 3.2.3 Channel mode message Command: MODE Parameters: *( ( "-" / "+" ) * * ) The MODE command is provided so that users may query and change the characteristics of a channel. For more details on available modes and their uses, see "Internet Relay Chat: Channel Management" [IRC-CHAN]. Note that there is a maximum limit of three (3) FIXME changes per command for modes that take a parameter. If no modes are given, the server will return the simple modes and channel TS (if supported) for the channel. Numeric Replies: ERR_NEEDMOREPARAMS ERR_KEYSET ERR_NOCHANMODES ERR_BADCHANNAME ERR_CHANOPRIVSNEEDED ERR_USERNOTINCHANNEL ERR_UNKNOWNMODE RPL_CHANNELMODEIS RPL_CREATIONTIME RPL_BANLIST RPL_ENDOFBANLIST RPL_EXCEPTLIST RPL_ENDOFEXCEPTLIST RPL_INVITELIST RPL_ENDOFINVITELIST RPL_UNIQOPIS The following examples are given to help understanding the syntax of the MODE command, but refer to modes defined in "Internet Relay Chat: Channel Management" [IRC-CHAN]. Examples: MODE #Finnish +imI *!*@*.fi Command to make #Finnish channel moderated and 'invite-only' with user with a hostname matching *.fi automatically invited. MODE #Finnish +o Kilroy Command to give channel operator privileges to Kilroy on channel #Finnish. MODE #Finnish +v Wiz Command to allow WiZ to speak on #Finnish. MODE #Fins -s Command to remove 'secret' flag from channel #Fins. MODE #42 +k ouluc Command to set the channel key to "oulu". MODE #42 -k oulu Command to remove the "oulu" channel key on channel "#42". MODE #eu-opers +l 10; Command to set the limit for the number of users on channel "#eu-opers" to 10. :WiZ!jto@tolsun.oulu.fi MODE #eu-opers -l User "WiZ" removing the limit for the number of users on channel "#eu-opers". MODE &oulu +b Command to list ban masks set for the channel "&oulu". MODE &oulu +b *!*@* Command to prevent all users from joining. MODE &oulu +b *!*@*.edu +e *!*@*.bu.edu Command to prevent any user from a hostname matching *.edu from joining, except if matching *.bu.edu MODE #bu +be *!*@*.edu *!*@*.bu.edu Command to prevent any user from a hostname matching *.edu from joining, except if matching *.bu.edu MODE #meditation e Command to list exception masks set for the channel "#meditation". MODE #meditation I Command to list invitations masks set for the channel "#meditation". MODE #chatspike +beI Command to list bans, excecption masks and invite exception masks for the channel “#chatspike” 3.2.4 Topic message Command: TOPIC Parameters: [ ] The TOPIC command is used to change or view the topic of a channel. The topic for channel is returned if there is no given. If the parameter is present, the topic for that channel will be changed, if this action is allowed for the user requesting it. If the parameter is an empty string, the topic for that channel will be removed. Numeric Replies: RPL_NOTOPIC RPL_TOPIC RPL_TOPICWHOTIME ERR_NEEDMOREPARAMS ERR_NOTONCHANNEL ERR_CHANOPRIVSNEEDED ERR_NOCHANMODES Examples: :WiZ!jto@tolsun.oulu.fi TOPIC #test :New topic ; User Wiz setting the topic. :irc2.example.net TOPIC #test :A topic ; Server irc2.example.net restoring the topic after a split. TOPIC #test :another topic; Command to set the topic on #test to "another topic". TOPIC #test : ; Command to clear the topic on #test. TOPIC #test; Command to check the topic for #test. 3.2.5 Names message Command: NAMES Parameters: [ ] By using the NAMES command, a user can list all nicknames that are visible to him. For more details on what is visible and what is not, see "Internet Relay Chat: Channel Management" [IRC-CHAN]. The parameter specifies which channel(s) to return information about. There is no error reply for bad channel names. If no parameter is given, a list of all channels and their occupants MAY be returned. At the end of this list, all users who are visible but either not on any channel or not on a visible channel MAY be listed as being on `channel' "*". Numerics: ERR_TOOMANYMATCHES ERR_NOSUCHSERVER RPL_NAMREPLY RPL_ENDOFNAMES Examples: NAMES #twilight_zone,#42 ; Command to list visible users on #twilight_zone and #42 NAMES; Command to list all visible channels and users 3.2.6 List message Command: LIST Parameters: [ ] The list command is used to list channels and their topics. If the parameter is used, only the status of that channel is displayed. Numeric Replies: ERR_TOOMANYMATCHES ERR_NOSUCHSERVER RPL_LIST RPL_LISTEND Examples: LIST ; Command to list a server-defined default selection of channels. LIST #twilight_zone,#42; Command to list channels #twilight_zone and #42 3.2.7 Invite message Command: INVITE Parameters: The INVITE command is used to invite a user to a channel. The parameter is the nickname of the person to be invited to the target channel . Servers SHOULD NOT allow invites to nonexistent channels and MUST NOT allow invites to existing channels from users who are not members of the channel. See the channel management document [IRC-CHAN] for more details on what is allowed and the exact effects. Only the user inviting and the user being invited will receive notification of the invitation. Other channel members are not notified. (This is unlike the MODE changes, and is occasionally the source of trouble for users.) Numeric Replies: ERR_NEEDMOREPARAMS ERR_NOSUCHNICK ERR_NOTONCHANNEL ERR_USERONCHANNEL ERR_CHANOPRIVSNEEDED RPL_INVITING RPL_AWAY Examples: :Angel!wings@irc.org INVITE Wiz #Dust ; Message to WiZ when he has been invited by user Angel to channel #Dust INVITE Wiz #Twilight_Zone ; Command to invite WiZ to #Twilight_zone 3.2.8 Kick command Command: KICK Parameters: [] The KICK command can be used to request the forced removal of a user from a channel. It causes the to PART from the by force. If a "comment" is given, this will be sent instead of the default message. Numeric Replies: ERR_NEEDMOREPARAMS ERR_NOSUCHCHANNEL ERR_BADCHANMASK ERR_CHANOPRIVSNEEDED ERR_USERNOTINCHANNEL ERR_NOTONCHANNEL Examples: KICK &Melbourne Matthew; Command to kick Matthew from &Melbourne KICK #Finnish John :Speaking English ; Command to kick John from #Finnish using "Speaking English" as the reason (comment). :WiZ!jto@tolsun.oulu.fi KICK #Finnish John ; KICK message on channel #Finnish from WiZ to remove John from channel :irc.example.net KICK #secret John :Net Rider ; Server irc.example.net kicking user who appears to be abusing a network split 3.3 Sending messages The main purpose of the IRC protocol is to provide a base for clients to communicate with each other. PRIVMSG and NOTICE are the only messages available which actually perform delivery of a text message from one client to another - the rest just make it possible and try to ensure it happens in a reliable and structured manner. 3.3.1 Private messages Command: PRIVMSG Parameters: *( "," ) PRIVMSG is used to send private messages between users, as well as to send messages to channels. is usually the nickname of the recipient of the message, a channel name or a particular status (e.g. "@") on a channel which sends to all users with that status or higher. Directed messages ( BNF) are sent to a user or users on the given server. This document does not specify how this is determined. In particular, a server MAY not allow any message of this type at all, or conversely a server MAY require directed messages to send to certain clients. For operators, the parameter may also be a host mask or server mask. The syntax is not specified here but must follow the BNF. The server will send the PRIVMSG to those who have a server or host matching the mask. The server MAY require that the mask have at least 1 (one) "." in it and no wildcards following the last ".", to prevent people broadcasting messages to all users. Wildcards are the '*' and '?' characters. Messages to the special target '*' may only be sent by servers. This is useful to send the exact same message to a group of users which cannot be described by another , for example all users receiving a certain kind of server notice. Servers MAY limit the number of recipients in a PRIVMSG and SHOULD NOT process duplicate recipients. Numeric Replies: ERR_NORECIPIENT ERR_NOTEXTTOSEND ERR_CANNOTSENDTOCHAN ERR_NOTOPLEVEL ERR_WILDTOPLEVEL ERR_TOOMANYTARGETS ERR_NOSUCHNICK RPL_AWAY Examples: :Angel!wings@irc.org PRIVMSG Wiz :Are you receiving this message ? ; Message from Angel to Wiz. PRIVMSG Angel :yes I'm receiving it ! ; Command to send a message to Angel. PRIVMSG #chat :hi there ; Command to send a message to channel #chat. PRIVMSG jto@tolsun.oulu.fi :Hello ! ; Command to send a message to some user on server tolsun.oulu.fi identified by "jto". 3.3.2 Notice Command: NOTICE Parameters: *( "," ) The NOTICE command is used similarly to PRIVMSG. The difference between NOTICE and PRIVMSG is that automatic replies MUST NEVER be sent in response to a NOTICE message. This rule applies to servers too - they MUST NOT send any error reply back to the client on receipt of a notice. The object of this rule is to avoid loops between clients automatically sending something in response to something they received. This is typically used by servers and automata (clients with either an AI or other interactive program controlling their actions). Servers MAY limit the number of recipients in a NOTICE and SHOULD NOT process duplicate recipients. See PRIVMSG for more details on replies and examples. NOTICE $*.fi :{*.fi} Server tolsun.oulu.fi rebooting. ; Some sort of global message. :irc.example.net NOTICE * :*** Notice -- No response from irc2.example.net, closing link ; Server notifying operators of a ping timeout on a server link. 3.4 Server queries and commands The server query group of commands has been designed to return information about any server which is connected to the network. In these queries, where a parameter appears as , wildcard masks are usually valid. For each parameter, however, only one query and set of replies is to be generated. In most cases, if a nickname is given, it will mean the server to which the user is connected. 3.3.3 Wallops message Command: WALLOPS Parameters: The WALLOPS command is used to send a message to all currently connected users who have set the 'w' user mode for themselves. (See Section 3.1.5 "User modes"). Numeric Replies: ERR_NEEDMOREPARAMS Example: :csd.bu.edu WALLOPS :Connect '*.uiuc.edu 6667' from Joshua WALLOPS message from csd.bu.edu announcing a CONNECT message it received from Joshua and acted upon. 3.4.1 Motd message Command: MOTD Parameters: [ ] The MOTD command is used to get the "Message Of The Day" of the given server, or current server if is omitted. Wildcards are allowed in the parameter. Numeric Replies: RPL_MOTDSTART RPL_MOTD RPL_ENDOFMOTD ERR_NOMOTD 3.4.2 Lusers message Command: LUSERS Parameters: [ [ ] ] The LUSERS command is used to get statistics about the size of the IRC network. If no parameter is given, the reply will be about the whole net. If a is specified, then the reply MAY only concern the part of the network formed by the servers matching the mask, but it MAY also be about the whole net. Finally, if the parameter is specified, the request is forwarded to that server which will generate the reply. Wildcards are allowed in the parameter. Numeric Replies: RPL_LUSERCLIENT RPL_LUSEROP RPL_LUSERUNKNOWN RPL_LUSERCHANNELS RPL_LUSERME ERR_NOSUCHSERVER 3.4.3 Version message Command: VERSION Parameters: [ ] The VERSION command is used to query the version of the server program. An optional parameter is used to query the version of the server program which a client is not directly connected to. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER RPL_VERSION Examples: VERSION tolsun.oulu.fi ; Command to check the version of server "tolsun.oulu.fi". 3.4.4 Stats message Command: STATS Parameters: [ ] The stats command is used to query statistics of certain server. A query may be given for any single letter which is only checked by the destination server and is otherwise passed on by intermediate servers, ignored and unaltered. Wildcards are allowed in the parameter. Except for the ones below, the list of valid queries is implementation dependent. The standard queries below SHOULD be supported by the server: l - returns a list of the server's connections, showing how long each connection has been established and the traffic over that connection in Kbytes and messages for each direction; m - returns the usage count for each of commands supported by the server; commands for which the usage count is zero MAY be omitted; o - returns a list of configured privileged users, operators; u - returns a string showing how long the server has been up. It is also RECOMMENDED that client and server access configuration be published this way. Numeric Replies: ERR_NOSUCHSERVER RPL_STATSLINKINFO RPL_STATSUPTIME RPL_STATSCOMMANDS RPL_STATSOLINE RPL_ENDOFSTATS Examples: STATS m ; Command to check the command usage for the server you are connected to 3.4.5 Links message Command: LINKS Parameters: [ [ ] ] With LINKS, a user can list all servernames, which are known by the server answering the query. The returned list of servers MUST match the mask, or if no mask is given, the full list is returned. If is given in addition to , the LINKS command is forwarded to the first server found that matches that name (if any), and that server is then required to answer the query. Numeric Replies: ERR_NOSUCHSERVER RPL_LINKS RPL_ENDOFLINKS Examples: LINKS *.au ; Command to list all servers which have a name that matches *.au; LINKS *.edu *.bu.edu; Command to list servers matching *.bu.edu as seen by the first server matching *.edu. 3.4.6 Time message Command: TIME Parameters: [ ] The time command is used to query local time from the specified server. If the parameter is not given, the server receiving the command must reply to the query. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER RPL_TIME Examples: TIME tolsun.oulu.fi ; check the time on the server "tolson.oulu.fi" 3.4.7 Connect message Command: CONNECT Parameters: [ ] The CONNECT command can be used to request a server to try to establish a new connection to another server immediately. CONNECT is a privileged command and SHOULD be available only to IRC Operators. If a is given and its mask doesn't match name of the parsing server, the CONNECT attempt is sent to the first match of remote server. Otherwise the CONNECT attempt is made by the server processing the request. The server receiving a remote CONNECT command SHOULD generate a WALLOPS message describing the source and target of the request. Numeric Replies: ERR_NOSUCHSERVER ERR_NOPRIVILEGES ERR_NEEDMOREPARAMS Examples: CONNECT tolsun.oulu.fi 6667 ; Command to attempt to connect local server to tolsun.oulu.fi on port 6667 3.4.8 Trace message Command: TRACE Parameters: [ ] TRACE command is used to find the route to specific server and information about its peers. Each server that processes this command MUST report to the sender about it. The replies from pass-through links form a chain, which shows route to destination. After sending this reply back, the query MUST be sent to the next server until given server is reached. TRACE command is used to find the route to specific server. Each server that processes this message MUST tell the sender about it by sending a reply indicating it is a pass-through link, forming a chain of replies. After sending this reply back, it MUST then send the TRACE message to the next server until given server is reached. If the parameter is omitted, it is RECOMMENDED that TRACE command sends a message to the sender telling which servers the local server has direct connection to. If the destination given by is an actual server, the destination server is REQUIRED to report all servers and operators which are connected to it; if the command was issued by an operator, the server MAY also report all users which are connected to it. If the destination given by is a nickname, then only a reply for that nickname is given. If the parameter is omitted, it is RECOMMENDED that the TRACE command is parsed as targeted to the processing server. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER If the TRACE message is destined for another server, all intermediate servers must return a RPL_TRACELINK reply to indicate that the TRACE passed through it and where it is going next. RPL_TRACELINK A TRACE reply may be composed of any number of the following numeric replies. RPL_TRACECONNECTING RPL_TRACEHANDSHAKE RPL_TRACEUNKNOWN RPL_TRACEOPERATOR RPL_TRACEUSER RPL_TRACESERVER RPL_TRACESERVICE RPL_TRACENEWTYPE RPL_TRACECLASS RPL_TRACELOG RPL_TRACEEND Examples: TRACE *.oulu.fi ; TRACE to a server matching *.oulu.fi 3.4.9 Admin command Command: ADMIN Parameters: [ ] The admin command is used to find information about the administrator of the given server, or current server if parameter is omitted. Each server MUST have the ability to forward ADMIN messages to other servers. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER ERR_NOADMININFO RPL_ADMINME RPL_ADMINLOC1 RPL_ADMINLOC2 RPL_ADMINEMAIL Examples: ADMIN tolsun.oulu.fi; request an ADMIN reply from tolsun.oulu.fi ADMIN syrk ; ADMIN request for the server to which the user syrk is connected 3.4.10 Info command Command: INFO Parameters: [ ] The INFO command is REQUIRED to return information describing the server: its version, when it was compiled, the patchlevel, when it was started, and any other miscellaneous information which may be considered to be relevant. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER RPL_INFO RPL_ENDOFINFO Examples: INFO csd.bu.edu ; request an INFO reply from csd.bu.edu INFO Angel ; request info from the server that Angel is connected to. 3.6 User based queries User queries are a group of commands which are primarily concerned with finding details on a particular user or group users. When using wildcards with any of these commands, if they match, they will only return information on users who are 'visible' to you. The visibility of a user is determined as a combination of the user's mode and the common set of channels you are both on. 3.6.1 Who query Command: WHO Parameters: [ "o" ] The WHO command is used by a client to generate a query which returns a list of information which 'matches' the parameter given by the client. The passed to WHO is matched against users' host, server, real name and nickname if the channel cannot be found. If the "o" parameter is passed only operators are returned according to the supplied. Numeric Replies: RPL_WHOREPLY RPL_ENDOFWHO Examples: WHO *.fi; Command to list all users who match against "*.fi". WHO jto* o ; Command to list all users with a match against "jto*" if they are an operator. 3.6.2 Whois query Command: WHOIS Parameters: [ ] This command is used to query information about particular user. The server will answer this command with several numeric messages indicating different statuses of the user (if the nick is in use). If the parameter is specified, it sends the query to a specific server. It is useful if you want to know how long the user in question has been idle as only local server (i.e., the server the user is directly connected to) knows that information, while everything else is globally known. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER ERR_NONICKNAMEGIVEN RPL_WHOISUSER RPL_WHOISCHANNELS RPL_WHOISCHANNELS RPL_WHOISSERVER RPL_AWAY RPL_WHOISOPERATOR RPL_WHOISIDLE ERR_NOSUCHNICK RPL_ENDOFWHOIS Examples: WHOIS WiZ ; return available user information about nick WiZ WHOIS WiZ WiZ ; return available user information about nick WiZ including idle time WHOIS eff.org trillian ; ask server eff.org for user information about trillian 3.6.3 Whowas Command: WHOWAS Parameters: [ ] Whowas asks for information about a nickname which no longer exists. This may either be due to a nickname change or the user leaving IRC. In response to this query, the server searches through its nickname history, looking for any nicks which are lexically the same (no wild card matching here). The history is searched backward, returning the most recent entry first. If there are multiple entries, up to replies will be returned (or all of them if no parameter is given). If a non-positive number is passed as being , then a full search is done. Numeric Replies: ERR_NONICKNAMEGIVEN ERR_WASNOSUCHNICK RPL_WHOWASUSER RPL_WHOISSERVER RPL_ENDOFWHOWAS Examples: WHOWAS Wiz ; return all information in the nick history about nick "WiZ"; WHOWAS Mermaid 9 ; return at most, the 9 most recent entries in the nick history for "Mermaid"; 3.6.4 Userhost message Command: USERHOST Parameters: *( SPACE ) The USERHOST command takes up to 5 nicknames (each as a separate parameter) and returns a list of information about each nickname that it found. The returned list has each reply separated by a space. If and only if the reply would exceed the maximum line length, the server MUST omit the last nick (or more, if it still does not fit). The client cannot distinguish this from nonexistent nicks, so it SHOULD take this occurence into account and send fewer nicks if it could occur. If the client is querying its own nick, the server MAY send the client's IP address instead of its hostname. Numeric Replies: RPL_USERHOST ERR_NEEDMOREPARAMS Example: USERHOST Wiz Michael syrk ; USERHOST request for information on nicks "Wiz", "Michael", and "syrk" :ircd.stealth.net 302 yournick :syrk=+syrk@millennium.stealth.net ; Reply for user syrk 3.6.5 Ison message Command: ISON Parameters: *( SPACE ) The ISON command was implemented to provide a quick and efficient means to get a response about whether a given nickname was currently on IRC. ISON only takes one (1) type of parameter: a space-separated list of nicks. For each nickname in the list that is present, the server adds that to its reply string. Thus the reply string may return empty (none of the given nicks are present), an exact copy of the parameter string (all of them present) or any other subset of the set of nicks given in the parameter. The only limit on the number of nicks that may be checked is that the combined length MUST NOT be too large as to cause the server to chop it off so it fits in 512 characters. The nicks may be sent in one parameter or in multiple parameters; in the latter case the MAXPARA limit applies. ISON is only processed by the server local to the client sending the command and thus not passed onto other servers for further processing. Numeric Replies: RPL_ISON ERR_NEEDMOREPARAMS Example: ISON phone trillian WiZ jarlek Avalon Angel Monstah syrk ; Sample ISON request for 7 nicks. 3.7 Miscellaneous messages Messages in this category do not fit into any of the above categories but are nonetheless still a part of and REQUIRED by the protocol. 3.7.1 Kill message Command: KILL Parameters: The KILL command is used to cause a client-server connection to be closed by the server which has the actual connection. Servers generate KILL messages on nickname collisions. It MAY also be available available to users who have the operator status. Clients which have automatic reconnect algorithms effectively make this command useless since the disconnection is only brief. It does however break the flow of data and can be used to stop large amounts of 'flooding' from abusive users or accidents. Abusive users usually don't care as they will reconnect promptly and resume their abusive behaviour. To prevent this command from being abused, any user may elect to receive KILL messages generated for others to keep an 'eye' on would be trouble spots. In an arena where nicknames are REQUIRED to be globally unique at all times, KILL messages are sent whenever 'duplicates' are detected (that is an attempt to register two users with the same nickname) in the hope that both of them will disappear and only 1 reappear. When a client is removed as the result of a KILL message, the server SHOULD add the nickname to the list of unavailable nicknames in an attempt to avoid clients to reuse this name immediately which is usually the pattern of abusive behaviour often leading to useless "KILL loops". See the "IRC Server Protocol" document [IRC-SERVER] for more information on this procedure. The comment given MUST reflect the actual reason for the KILL. For server-generated KILLs it usually is made up of details concerning the origins of the two conflicting nicknames. For users it is left up to them to provide an adequate reason to satisfy others who see it. To prevent/discourage fake KILLs from being generated to hide the identify of the KILLer, the comment also shows a 'kill-path' which is updated by each server it passes through, each prepending its name to the path. Numeric Replies: ERR_NOPRIVILEGES ERR_NEEDMOREPARAMS ERR_NOSUCHNICK ERR_CANTKILLSERVER NOTE: It is RECOMMENDED that only Operators be allowed to kill other users with KILL command. This command has been the subject of many controversies over the years, and along with the above recommendation, it is also widely recognized that not even operators should be allowed to kill users on remote servers. 3.7.2 Ping message Command: PING Parameters: [ ] The PING command is used to test the presence of an active client or server at the other end of the connection. Servers send a PING message at regular intervals if no other activity detected coming from a connection. If a connection fails to respond to a PING message within a set amount of time, that connection is closed. A PING message MAY be sent even if the connection is active. When a PING message is received, the appropriate PONG message MUST be sent as reply to (server which sent the PING message out) as soon as possible. If the parameter is specified, it represents the target of the ping, and the message gets forwarded there. Numeric Replies: ERR_NOORIGIN ERR_NOSUCHSERVER Examples: PING tolsun.oulu.fi ; Command to send a PING message to server PING WiZ tolsun.oulu.fi; Command from WiZ to send a PING message to server "tolsun.oulu.fi" PING :irc.funet.fi ; Ping message sent by server "irc.funet.fi" 3.7.3 Pong message Command: PONG Parameters: [ ] PONG message is a reply to ping message. If parameter is given, this message MUST be forwarded to given target. The parameter is the name of the entity who has responded to PING message and generated this message. Numeric Replies: ERR_NOORIGIN ERR_NOSUCHSERVER Example: PONG csd.bu.edu tolsun.oulu.fi ; PONG message from csd.bu.edu to tolsun.oulu.fi 3.7.4 Error Command: ERROR Parameters: The ERROR command is for use by servers when reporting a serious or fatal error to its peers. It may also be sent from one server to another but MUST NOT be accepted from any normal unknown clients. Only an ERROR message SHOULD be used for reporting errors which occur with a server-to-server link. An ERROR message is sent to the server at the other end (which reports it to appropriate local users and logs) and to appropriate local users and logs. It is not to be passed onto any other servers by a server if it is received from a server. The ERROR message is also used before terminating a client connection. When a server sends a received ERROR message to its operators, the message SHOULD be encapsulated inside a NOTICE message, indicating that the client was not responsible for the error. Numerics: None. Examples: ERROR :Server *.fi already exists ; ERROR message to the other server which caused this error. NOTICE WiZ :ERROR from csd.bu.edu -- Server *.fi already exists ; Same ERROR message as above but sent to user WiZ on the other server. 4. Optional features This section describes OPTIONAL messages. They are not required in a working server implementation of the protocol described herein. 4.1 Rehash message Command: REHASH Parameters: None The rehash command is an administrative command which can be used by an operator to force the server to re-read and process its configuration file. Numeric Replies: RPL_REHASHING ERR_NOPRIVILEGES Example: REHASH ; message from user with operator status to server asking it to reread its configuration file. 4.2 Die message Command: DIE Parameters: None An operator can use the DIE command to shutdown the server. This message is optional since it may be viewed as a risk to allow arbitrary people to connect to a server as an operator and execute this command. Numeric Replies: ERR_NOPRIVILEGES Example: DIE ; no parameters required. 4.3 Restart message Command: RESTART Parameters: None An operator can use the restart command to force the server to restart itself. This message is optional since it may be viewed as a risk to allow arbitrary people to connect to a server as an operator and execute this command, causing (at least) a disruption to service. Numeric Replies: ERR_NOPRIVILEGES Example: RESTART ; no parameters required. 5. Replies The following is a list of numeric replies which are generated in response to the commands given above. Each numeric is given with its number, name and reply string. 5.1 Command responses Numerics in the range from 001 to 099 are used for client-server connections only and should never travel between servers. Replies generated in the response to commands are found in the range from 200 to 399. 001 RPL_WELCOME "Welcome to the Internet Relay Network !@" 002 RPL_YOURHOST "Your host is , running version " 003 RPL_CREATED "This server was created " 004 RPL_MYINFO " " - The server sends Replies 001 to 004 to a user upon successful registration. 005 RPL_ISUPPORT see isupport in BNF - Sent upon successful registration, somewhere after RPL_MYINFO, and possibly when the information changes. 010 RPL_BOUNCE " :Please use this Server/Port instead" "Try server , port " - Sent by the server to a user to suggest an alternative server. This is often used when the connection is refused because the server is already full. 302 RPL_USERHOST ":*1 *( " " )" - Reply format used by USERHOST to list replies to the query list. The reply string is composed as follows: reply = nickname [ "*" ] "=" ( "+" / "-" ) user "@" hostname The '*' indicates whether the client has registered as an Operator. The '-' or '+' characters represent whether the client has set an AWAY message or not respectively. 303 RPL_ISON ":*1 *( " " )" - Reply format used by ISON to list replies to the query list. 301 RPL_AWAY " :" 305 RPL_UNAWAY ":You are no longer marked as being away" 306 RPL_NOWAWAY ":You have been marked as being away" - These replies are used with the AWAY command (if allowed). RPL_AWAY is sent to any client sending a PRIVMSG or INVITE to a client which is away. RPL_AWAY is only sent by the server to which the client is connected. RPL_AWAY is also sent in a WHOIS reply. Replies RPL_UNAWAY and RPL_NOWAWAY are sent when the client removes and sets an AWAY message. 311 RPL_WHOISUSER " * :" 312 RPL_WHOISSERVER " :" 313 RPL_WHOISOPERATOR " :is an IRC operator" 317 RPL_WHOISIDLE " :seconds idle, signon time" " :seconds idle" 318 RPL_ENDOFWHOIS " :End of WHOIS list" 319 RPL_WHOISCHANNELS " :*( ( "@" / "+" ) " " )" - Replies 311 - 313, 317 - 319 are all replies generated in response to a WHOIS message. Given that there are enough parameters present, the answering server MUST either formulate a reply out of the above numerics (if the query nick is found) or return an error reply. The '*' in RPL_WHOISUSER is there as the literal character and not as a wild card. For each reply set, only RPL_WHOISCHANNELS may appear more than once (for long lists of channel names). The '@' and '+' characters next to the channel name indicate whether a client is a channel operator or has been granted permission to speak on a moderated channel. The RPL_ENDOFWHOIS reply is used to mark the end of processing a WHOIS message. RPL_WHOISIDLE has a current form with signon time and an obsolete form which SHOULD NOT be used. 314 RPL_WHOWASUSER " * :" 369 RPL_ENDOFWHOWAS " :End of WHOWAS" - When replying to a WHOWAS message, a server MUST use the replies RPL_WHOWASUSER, RPL_WHOISSERVER or ERR_WASNOSUCHNICK for each nickname in the presented list. At the end of all reply batches, there MUST be RPL_ENDOFWHOWAS (even if there was only one reply and it was an error). The server info in RPL_WHOISSERVER should be replaced by a human-readable representation of the date and time the user disconnected or changed nick. The time zone should be the same as in RPL_TIME. 321 RPL_LISTSTART "Channel :Users Name" 322 RPL_LIST " :" 323 RPL_LISTEND ":End of LIST" - RPL_LISTSTART MAY be sent at the start of the list. Replies RPL_LIST, RPL_LISTEND mark the actual replies with data and end of the server's response to a LIST command. The number in RPL_LIST is the number of channel members. If there are no channels available to return, only the end reply MUST be sent. 325 RPL_UNIQOPIS " " 324 RPL_CHANNELMODEIS " " 329 RPL_CREATIONTIME " " - RPL_CHANNELMODEIS is sent when querying the channel mode via MODE with just a channel name. If the user is not on the channel, the mode parameters MUST be either entirely omitted or masked as necessary to comply with the rules in the channel management document. If the server supports channel TS, it should send RPL_CREATIONTIME after RPL_CHANNELMODEIS, listing the channel's timestamp. See channel management document. 331 RPL_NOTOPIC " :No topic is set" 332 RPL_TOPIC " :" 333 RPL_TOPICWHOTIME " " - When sending a TOPIC message to determine the channel topic, either a RPL_NOTOPIC reply is sent, or a RPL_TOPIC reply which SHOULD be followed by RPL_TOPICWHOTIME. 341 RPL_INVITING " " - Returned by the server to indicate that the attempted INVITE message was successful and is being passed onto the end client. 346 RPL_INVITELIST " " " " 347 RPL_ENDOFINVITELIST " :End of channel invite list" - When listing the 'invitations masks' for a given channel, a server is required to send the list back using the RPL_INVITELIST and RPL_ENDOFINVITELIST messages. A separate RPL_INVITELIST is sent for each active mask, which SHOULD include the setter and timestamp. After the masks have been listed (or if none present) a RPL_ENDOFINVITELIST MUST be sent. 348 RPL_EXCEPTLIST " " " " 349 RPL_ENDOFEXCEPTLIST " :End of channel exception list" - When listing the 'exception masks' for a given channel, a server is required to send the list back using the RPL_EXCEPTLIST and RPL_ENDOFEXCEPTLIST messages. A separate RPL_EXCEPTLIST is sent for each active mask, which SHOULD include the setter and timestamp. After the masks have been listed (or if none present) a RPL_ENDOFEXCEPTLIST MUST be sent. 351 RPL_VERSION ". :" - Reply by the server showing its version details. The is the version of the software being used (including any patchlevel revisions) and the is used to indicate if the server is running in "debug mode". The "comments" field may contain any comments about the version or further version details. 352 RPL_WHOREPLY " ( "H" / "G" > ["*"] [ ( "@" / "+" ) ] : " 315 RPL_ENDOFWHO " :End of WHO list" - The RPL_WHOREPLY and RPL_ENDOFWHO pair are used to answer a WHO message. The RPL_WHOREPLY is only sent if there is an appropriate match to the WHO query. If there is a list of parameters supplied with a WHO message, a RPL_ENDOFWHO MUST be sent after processing each list item with being the item. 'H' (here) and 'G' (gone) indicate AWAY status. The '*' indicates IRC operator status; it SHOULD be consistent with the '*' in RPL_USERHOST, the presence or absence of RPL_WHOISOPERATOR in a WHOIS reply and the use of RPL_TRACEUSER or RPL_TRACEOPERATOR in a TRACE reply. '@' and '+' (or another PREFIX character) indicate status in the channel listed. 353 RPL_NAMREPLY "( "=" / "*" / "@" ) :[ "@" / "+" ] *( " " [ "@" / "+" ] ) - "@" is used for secret channels, "*" for private channels, and "=" for others (public channels). 366 RPL_ENDOFNAMES " :End of NAMES list" - To reply to a NAMES message, a reply pair consisting of RPL_NAMREPLY and RPL_ENDOFNAMES is sent by the server back to the client. If there is no channel found as in the query, then only RPL_ENDOFNAMES is returned. The exception to this is when a NAMES message is sent with no parameters and all visible channels and contents are sent back in a series of RPL_NAMREPLY messages with a RPL_ENDOFNAMES to mark the end. 364 RPL_LINKS " : " 365 RPL_ENDOFLINKS " :End of LINKS list" - In replying to the LINKS message, a server MUST send replies back using the RPL_LINKS numeric and mark the end of the list using an RPL_ENDOFLINKS reply. 367 RPL_BANLIST " " " " 368 RPL_ENDOFBANLIST " :End of channel ban list" - When listing the active 'bans' for a given channel, a server is required to send the list back using the RPL_BANLIST and RPL_ENDOFBANLIST messages. A separate RPL_BANLIST is sent for each active banmask, which SHOULD include the setter and timestamp. After the banmasks have been listed (or if none present) a RPL_ENDOFBANLIST MUST be sent. 371 RPL_INFO ":" 374 RPL_ENDOFINFO ":End of INFO list" - A server responding to an INFO message is required to send all its 'info' in a series of RPL_INFO messages with a RPL_ENDOFINFO reply to indicate the end of the replies. 375 RPL_MOTDSTART ":- Message of the day - " 372 RPL_MOTD ":- " 376 RPL_ENDOFMOTD ":End of MOTD command" - When responding to the MOTD message and the MOTD file is found, the file is displayed line by line, with each line no longer than 80 characters, using RPL_MOTD format replies. These MUST be surrounded by a RPL_MOTDSTART (before the RPL_MOTDs) and an RPL_ENDOFMOTD (after). 381 RPL_YOUREOPER ":You are now an IRC operator" - RPL_YOUREOPER is sent back to a client which has just successfully issued an OPER message and gained operator status. 382 RPL_REHASHING " :Rehashing" - If the REHASH option is used and an operator sends a REHASH message, an RPL_REHASHING is sent back to the operator. 391 RPL_TIME " :" - When replying to the TIME message, a server MUST send the reply using the RPL_TIME format above. The string showing the time need only contain the correct day and time there. There is no further requirement for the time string. 200 RPL_TRACELINK "Link V " 201 RPL_TRACECONNECTING "Try. " 202 RPL_TRACEHANDSHAKE "H.S. " 203 RPL_TRACEUNKNOWN "???? []" 204 RPL_TRACEOPERATOR "Oper " 205 RPL_TRACEUSER "User " 206 RPL_TRACESERVER "Serv S C @ V" 208 RPL_TRACENEWTYPE " 0 " 209 RPL_TRACECLASS "Class " 210 RPL_TRACERECONNECT Unused. 261 RPL_TRACELOG "File " 262 RPL_TRACEEND " :End of TRACE" - The RPL_TRACE* are all returned by the server in response to the TRACE message. How many are returned is dependent on the TRACE message and whether it was sent by an operator or not. There is no predefined order for which occurs first. Replies RPL_TRACEUNKNOWN, RPL_TRACECONNECTING and RPL_TRACEHANDSHAKE are all used for connections which have not been fully established and are either unknown, still attempting to connect or in the process of completing the 'server handshake'. RPL_TRACELINK is sent by any server which handles a TRACE message and has to pass it on to another server. The list of RPL_TRACELINKs sent in response to a TRACE command traversing the IRC network should reflect the actual connectivity of the servers themselves along that path. RPL_TRACENEWTYPE is to be used for any connection which does not fit in the other categories but is being displayed anyway. RPL_TRACEEND is sent to indicate the end of the list. 211 RPL_STATSLINKINFO "