--- irc3-20011015.txt 2001-10-16 17:00:14 +0900 +++ irc3-20020208.txt 2003-11-16 17:35:27 +0900 @@ -1,5 +1,5 @@ Network Working Group A. Church -Request For Comments: nnnn October, 2001 +Request For Comments: nnnn February, 2002 Obsoletes: 1459 Category: Experimental @@ -316,7 +316,9 @@ has the same restrictions (except for length) as server names; again, for compatibility with older clients, newer clients SHOULD NOT allow users to select nicknames with the space, comma, or CR/LF characters, - as those are delimiters under the old protocol. Additionally, + as those are delimiters under the old protocol. The character "!" + (ASCII 0x21) also SHOULD NOT be permitted, since it is used to + delimit nicknames from usernames in the old protocol. Additionally, clients SHOULD NOT allow nicknames that begin with "#" or "&", as those are used at the beginning of channel names (see section 1.4), and while this protocol has no ambiguity between nicknames and @@ -1269,7 +1271,8 @@ username (user-string), real-name (string) Server-server parameters: client-id (shortint), nickname (string), username (user-string), real-name (string), - hostname (string), time (timestamp) + hostname (string), network-address + (string), time (timestamp) user-string = * @@ -1303,18 +1306,23 @@ If the nickname given by the client is already in use, the server MUST return ERR_NICKNAME_IN_USE and ignore the message. + If the username given by the client contains the "@" character (ASCII + 0x40), the server MUST return ERR_INVALID_NAME and discard the + message. + Servers MAY limit the set of characters they accept in client - nicknames and usernames. If a nickname is determined to be invalid, - the server MUST return ERR_INVALID_NAME and discard the message. If - a username is determined to be invalid, the server MAY modify the - username and accept the rest of the message as-is instead of - discarding it; in this case, the server SHOULD send a notice to the - client (see section 3.2.3) explaining what was done. (For example, - the server might remove all invalid characters, or replace them with - an innocuous character such as "x".) See section 6.5 for a - discussion of potential security problems with allowing any character - to be used in a name. Servers SHOULD NOT modify the real-name - parameter. + nicknames and usernames (in addition to the limitation above on + usernames). If a nickname is determined to be invalid, the server + MUST return ERR_INVALID_NAME and discard the message. If a username + is determined to be invalid, the server MAY modify the username and + accept the rest of the message as-is instead of returning + ERR_INVALID_NAME and discarding it; in this case, the server SHOULD + send a notice to the client (see section 3.2.3) explaining what was + done. (For example, the server might remove all invalid characters, + or replace them with an innocuous character such as "x".) See + section 6.5 for a discussion of potential security problems with + allowing any character to be used in a name. Servers SHOULD NOT + modify the real-name parameter. Once the user message has been successfully processed, the server generates a new user message to forward to other servers. The @@ -1324,9 +1332,12 @@ (see section 1.2) and may be assigned arbitrarily by the server. The hostname parameter is the client's hostname as determined by the server; see section 6.2 for security notes on address-to-hostname - resolution. The time parameter is the time at which the client - connected to the server, or alternatively the time at which the - message is generated (either are acceptable). + resolution. The network-address parameter is the client's network + address; for Internet connections, this is the client's IP address in + binary, using network byte order. The time parameter is the time at + which the client connected to the server, or alternatively the time + at which the message is generated (either are acceptable). Servers + MUST NOT send a hostname containing the "@" character. Examples: @@ -1335,9 +1346,12 @@ "Alcan". SS: 0x0001 0x00000000 0x00000000 843254181 "Alcan" "achurch" - "Andrew Church" + "Andrew Church" "localhost.example.org" "\x7F\x00\x00\x01" + 843254181 Server 0 informing the network of the connection described - above; note that a timestamp is included. + above; note that a timestamp is included. The network address + consists of the four bytes with values 127, 0, 0, and 1 in that + order. Replies: @@ -2120,19 +2134,20 @@ 3.3.8 Channel ban message Code: 0x0207 (add), 0x0247 (list), 0x0287 (remove) - Parameters: channel-name (string), [userhost-mask (string) ...] + Parameters: channel-name (string), [nickname-mask (string), + username-mask (string), hostname-mask (string)] Adds or removes bans on clients joining channels. If a client - attempts to join a channel, and its address matches any of the ban - strings for that channel, the client's join request is denied. The - ban strings may contain wildcards. - - For the list message (0x0247), if one or more ban strings are sent, - then only those bans matching at least one string are returned, - otherwise all bans on the given channel are returned. The server - MUST send exactly one ban per response message. For the add (0x0207) - and remove (0x0287) messages, at least one string MUST be given, and - the sender MUST be a channel operator. + attempts to join a channel, and its nickname, username, and hostname + match any of the bans for that channel (i.e. all three strings match + the respective masks for a particular ban entry), the client's join + request is denied. The ban strings may contain wildcards. + + For the list message (0x0247), if masks are given, then only those + bans matching all masks are returned, otherwise all bans on the given + channel are returned. The server MUST send exactly one ban per + response message. For the add (0x0207) and remove (0x0287) messages, + the masks MUST be given, and the sender MUST be a channel operator. Examples: @@ -2245,37 +2260,76 @@ 3.4.3 Silence message - Code: 0x0302,0x0342 (add), 0x0382,0x03C2 (remove) - Parameters: (0x0302,0x0382) nickname (string) - (0x0342,0x03C2) mask (string) - - Adds a nickname or "user@host" mask to or removes a nickname or mask - from a client's "silence list". If the client would normally receive - a message from a client on the silence list, such messages will be - discarded. Specifically, if client B matches an entry on client A's - silence list, then: + Code: 0x0302,0x0382 (add), 0x0342,0x03C2 (remove), + 0x0362,0x03E2 (list) + Parameters: (0x0302,0x0342) nickname (string) + client-id (longint) + (0x0382,0x03C2) nickname-mask (string), username-mask + (string), hostname-mask (string) + (0x0362) none + nickname (string) + (0x03E2) none + nickname-mask (string), + username-mask (string), + hostname-mask (string) + + Adds a nickname or nick/user/host mask to, removes a nickname or mask + from, or displays a client's "silence list". If the client would + normally receive a message from a client on the silence list, such + messages will be discarded. Specifically, if client B matches an + entry on client A's silence list, then: - Any private messages or notices from client B to client A MUST be discarded by both client B's server and (if it receives any) - client A's server. + client A's server. (Intermediate servers are not required to + discard the messages, but MAY do so.) - Any other type of message or notice sent by client B which - client A would normally receive MUST NOT be sent to client A. + client A would normally receive MUST NOT be sent to client A by + client A's server. + + For the list messages, the server returns the nickname (0x0362) or + mask (0x03E2) entries on the client's silence list, one per message, + followed by RPL_SILENCE_END. + + For the nickname form of the add and remove messages (message codes + 0x0302 and 0x0342), the nickname is converted into a 32-bit integer + with the server ID of the client currently using the target nickname + in the high 16 bits and the client ID of that client on its server in + the lower 16 bits before being forwarded to other servers. If the + nickname is not currently in use, the server returns + ERR_NO_SUCH_USER; for 0x0342 (remove), if the client is not on the + silence list, the server returns ERR_NOT_ON_SILENCE_LIST. + + For the mask form (message codes 0x0382 and 0x03C2), the nickname, + username, and hostname masks are used as in the channel ban message + (section 3.3.8); a client is considered to match a silence list entry + iff all three strings match the respective masks in the entry. For + message code 0x03C2 (remove), if the mask is not on the silence list, + the server returns ERR_NOT_ON_SILENCE_LIST. + + When a client which is listed on another client's silence list + disconnects from the IRC network, that silence list entry is + automatically removed by the server. Examples: CS: 0x0302 "lamer" - Adds the nickname "lamer" to the client's silence list. - - CS: 0x0342 "*@*.lame.com" - Adds the mask "*@*.lame.com" to the client's silence list. Any - client matching this mask, regardless of nickname, will be - silenced. + Adds the nickname "lamer" to the client's silence list. If the + client with this nickname changes nicknames, it will still be + silenced until it disconnects from the IRC network. + + CS: 0x0382 "*" "*" "*.lame.com" + Adds the mask "*!*@*.lame.com" to the client's silence list. + Any client matching this mask (any client with a hostname + ending in ".lame.com", regardless of nickname or username) will + be silenced. Replies: ERR_NEED_MORE_PARAMS RPL_SILENCE_ADD - RPL_SILENCE_DEL + ERR_NO_SUCH_USER RPL_SILENCE_DEL + ERR_NOT_ON_SILENCE_LIST RPL_SILENCE_END 3.4.4 Client mode message @@ -2425,12 +2479,15 @@ 3.4.6 Kill message Code: 0x0305 - Parameters: nickname (string), reason (string) + Parameters: nickname (string), reason (string) + target-id (longint), reason (string) Forcibly terminates a client's connection to the IRC network. The server to which the named client is connected MUST send the kill message to the client and then immediately terminate the connection - upon receipt of the message. + upon receipt of the message. When forwarding this message to other + servers, the nickname is first translated to its corresponding + server/client ID pair. Non-operator clients MUST NOT be permitted to use this command. @@ -2654,16 +2711,17 @@ Parameters: who (string), [target-server (string)] nickname (string), status (bits-16), userhost (addr-string), real-name (string), - servername (string), [extra (string)] + servername (string), channel (string), + [extra (string)] bits-16 = shortint Requests information about the given "who". The string may contain wildcards. The string is matched against the nicknames, usernames, - hostnames, server names, and currently joined channels for each - client on the network, and any matches are returned in a message (one - for each match) with the same message code and the following - parameters: + hostnames, real-names, server names, and currently joined channels + for each client on the network, and any matches are returned in a + message (one for each match) with the same message code and the + following parameters: nickname: The nickname of the client. status: A 16-bit word with bits set as follows: @@ -2678,6 +2736,10 @@ real-name: The "real name" provided by the client. servername: The name of the server to which the client is connected. + channel: If the client is in a channel matching the "who" mask, + the name of that channel, else an empty string. If + the client is in multiple channels matching the + mask, the server may return any one of them. extra: Any other information on the client (format is implementation- and server-dependent). @@ -3094,8 +3156,6 @@ wildcards). * Nickname to which the ban applies (possibly including wildcards). - * Timestamp at which the ban expires, or "0" if the ban - does not expire. 0x63: Server connection information Requests a list of what servers the server will attempt to @@ -3126,8 +3186,6 @@ wildcards). * Nickname to which the ban applies (possibly including wildcards). - * Absolute time at which the ban expires, or "0" if the - ban does not expire. 0x6C: Active connection statistics Requests information on all active connections, including: @@ -3508,7 +3566,11 @@ Sent to confirm addition of a mask to the client's silence list. 0x0121 RPL_SILENCE_DEL - Sent to confirm deletion of a mask $Bw=(B the client's silence list. + Sent to confirm deletion of a mask from the client's silence list. + + 0x0122 RPL_SILENCE_END + Sent after the last entry of a client's silence list has been sent + (see section 3.4.3). 0x0200 RPL_WHO_END Sent in response to a who message (see section 3.6.1). @@ -3625,9 +3687,13 @@ section 3.6.5), but the server did not have any information on previous users of the nickname. - 0xC103 ERR_ALREADY_IN_CHANNEL + 0xC104 ERR_ALREADY_IN_CHANNEL A client in a channel tried to join that channel again. + 0xC105 ERR_NOT_ON_SILENCE_LIST + A client tried to remove an entry from its silence list that was + not found on the list. + 0xC180 ERR_NO_SUCH_SERVER A named server does not exist. @@ -4014,8 +4080,7 @@ In nicknames and server names, may cause unintended meaning when a user attempts to send a message to the name (for example, the client may attempt to send to a remote network). - In usernames, may cause confusion when combined with the - hostname. + Forbidden in usernames and hostnames (see section 3.1.2). 0xA0 On some systems, this is displayed as a space (ASCII 0x20) and @@ -4025,9 +4090,10 @@ 7. AUTHOR'S ADDRESS Andrew Church - 3716 Hayes Manor Lane - Olney, MD 20832 - USA + Primabera Isejuku #315 + 10-1 Isejuku, Ichikawa-shi + Chiba 272-0106 + Japan E-mail: achurch@achurch.org