📄 rfc2811.txt
字号:
Network Working Group C. KaltRequest for Comments: 2811 April 2000Updates: 1459Category: Informational Internet Relay Chat: Channel ManagementStatus of this Memo This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.Copyright Notice Copyright (C) The Internet Society (2000). All Rights Reserved.Abstract One of the most notable characteristics of the IRC (Internet Relay Chat) protocol is to allow for users to be grouped in forums, called channels, providing a mean for multiple users to communicate together. There was originally a unique type of channels, but with the years, new types appeared either as a response to a need, or for experimental purposes. This document specifies how channels, their characteristics and properties are managed by IRC servers.Table of Contents 1. Introduction ............................................... 2 2. Channel Characteristics .................................... 3 2.1 Namespace .............................................. 3 2.2 Channel Scope .......................................... 3 2.3 Channel Properties ..................................... 4 2.4 Privileged Channel Members ............................. 4 2.4.1 Channel Operators ................................. 5 2.4.2 Channel Creator ................................... 5 3. Channel lifetime ........................................... 5 3.1 Standard channels ...................................... 5 3.2 Safe Channels .......................................... 6 4. Channel Modes .............................................. 7 4.1 Member Status .......................................... 7 4.1.1 "Channel Creator" Status .......................... 7Kalt Informational [Page 1]RFC 2811 Internet Relay Chat: Channel Management April 2000 4.1.2 Channel Operator Status ........................... 8 4.1.3 Voice Privilege ................................... 8 4.2 Channel Flags .......................................... 8 4.2.1 Anonymous Flag .................................... 8 4.2.2 Invite Only Flag .................................. 8 4.2.3 Moderated Channel Flag ............................ 9 4.2.4 No Messages To Channel From Clients On The Outside 9 4.2.5 Quiet Channel ..................................... 9 4.2.6 Private and Secret Channels ....................... 9 4.2.7 Server Reop Flag .................................. 10 4.2.8 Topic ............................................. 10 4.2.9 User Limit ........................................ 10 4.2.10 Channel Key ...................................... 10 4.3 Channel Access Control ................................. 10 4.3.1 Channel Ban and Exception ......................... 11 4.3.2 Channel Invitation ................................ 11 5. Current Implementations .................................... 11 5.1 Tracking Recently Used Channels ........................ 11 5.2 Safe Channels .......................................... 12 5.2.1 Channel Identifier ................................ 12 5.2.2 Channel Delay ..................................... 12 5.2.3 Abuse Window ...................................... 13 5.2.4 Preserving Sanity In The Name Space ............... 13 5.2.5 Server Reop Mechanism ............................. 13 6. Current problems ........................................... 14 6.1 Labels ................................................. 14 6.1.1 Channel Delay ..................................... 14 6.1.2 Safe Channels ..................................... 15 6.2 Mode Propagation Delays ................................ 15 6.3 Collisions And Channel Modes ........................... 15 6.4 Resource Exhaustion .................................... 16 7. Security Considerations .................................... 16 7.1 Access Control ......................................... 16 7.2 Channel Privacy ........................................ 16 7.3 Anonymity ............................................... 17 8. Current support and availability ........................... 17 9. Acknowledgements ........................................... 17 10. References ................................................ 18 11. Author's Address .......................................... 18 12. Full Copyright Statement ................................... 191. Introduction This document defines in detail on how channels are managed by the IRC servers and will be mostly useful to people working on implementing an IRC server.Kalt Informational [Page 2]RFC 2811 Internet Relay Chat: Channel Management April 2000 While the concepts defined here are an important part of IRC, they remain non essential for implementing clients. While the trend seems to be towards more and more complex and "intelligent" clients which are able to take advantage of knowing the internal workings of channels to provide the users with a more friendly interface, simple clients can be implemented without reading this document. Many of the concepts defined here were designed with the IRC architecture [IRC-ARCH] in mind and mostly make sense in this context. However, many others could be applied to other architectures in order to provide forums for a conferencing system. Finally, it is to be noted that IRC users may find some of the following sections of interest, in particular sections 2 (Channel Characteristics) and 4 (Channel Modes).2. Channel Characteristics A channel is a named group of one or more users which will all receive messages addressed to that channel. A channel is characterized by its name, properties and current members.2.1 Namespace Channels names are strings (beginning with a '&', '#', '+' or '!' character) of length up to fifty (50) characters. Channel names are case insensitive. Apart from the the requirement that the first character being either '&', '#', '+' or '!' (hereafter called "channel prefix"). The only restriction on a channel name is that it SHALL NOT contain any spaces (' '), a control G (^G or ASCII 7), a comma (',' which is used as a list item separator by the protocol). Also, a colon (':') is used as a delimiter for the channel mask. The exact syntax of a channel name is defined in "IRC Server Protocol" [IRC-SERVER]. The use of different prefixes effectively creates four (4) distinct namespaces for channel names. This is important because of the protocol limitations regarding namespaces (in general). See section 6.1 (Labels) for more details on these limitations.2.2 Channel Scope A channel entity is known by one or more servers on the IRC network. A user can only become member of a channel known by the server to which the user is directly connected. The list of servers which knowKalt Informational [Page 3]RFC 2811 Internet Relay Chat: Channel Management April 2000 of the existence of a particular channel MUST be a contiguous part of the IRC network, in order for the messages addressed to the channel to be sent to all the channel members. Channels with '&' as prefix are local to the server where they are created. Other channels are known to one (1) or more servers that are connected to the network, depending on the channel mask: If there is no channel mask, then the channel is known to all the servers. If there is a channel mask, then the channel MUST only be known to servers which has a local user on the channel, and to its neighbours if the mask matches both the local and neighbouring server names. Since other servers have absolutely no knowledge of the existence of such a channel, the area formed by the servers having a name matching the mask has to be contiguous for the channel to be known by all these servers. Channel masks are best used in conjunction with server hostmasking [IRC-SERVER].2.3 Channel Properties Each channel has its own properties, which are defined by channel modes. Channel modes can be manipulated by the channel members. The modes affect the way servers manage the channels. Channels with '+' as prefix do not support channel modes. This means that all the modes are unset, with the exception of the 't' channel flag which is set.2.4 Privileged Channel Members In order for the channel members to keep some control over a channel, and some kind of sanity, some channel members are privileged. Only these members are allowed to perform the following actions on the channel: INVITE - Invite a client to an invite-only channel (mode +i) KICK - Eject a client from the channel MODE - Change the channel's mode, as well as members' privileges PRIVMSG - Sending messages to the channel (mode +n, +m, +v) TOPIC - Change the channel topic in a mode +t channelKalt Informational [Page 4]RFC 2811 Internet Relay Chat: Channel Management April 20002.4.1 Channel Operators The channel operators (also referred to as a "chop" or "chanop") on a given channel are considered to 'own' that channel. Ownership of a channel is shared among channel operators. Channel operators are identified by the '@' symbol next to their nickname whenever it is associated with a channel (i.e., replies to the NAMES, WHO and WHOIS commands). Since channels starting with the character '+' as prefix do not support channel modes, no member can therefore have the status of channel operator.2.4.2 Channel Creator A user who creates a channel with the character '!' as prefix is identified as the "channel creator". Upon creation of the channel, this user is also given channel operator status. In recognition of this status, the channel creators are endowed with the ability to toggle certain modes of the channel which channel operators may not manipulate. A "channel creator" can be distinguished from a channel operator by issuing the proper MODE command. See the "IRC Client Protocol" [IRC-CLIENT] for more information on this topic.3. Channel lifetime In regard to the lifetime of a channel, there are typically two groups of channels: standard channels which prefix is either '&', '#' or '+', and "safe channels" which prefix is '!'.3.1 Standard channels These channels are created implicitly when the first user joins it, and cease to exist when the last user leaves it. While the channel exists, any client can reference the channel using the name of the channel. The user creating a channel automatically becomes channel operator with the notable exception of channels which name is prefixed by the character '+', see section 4 (Channel modes). See section 2.4.1 (Channel Operators) for more details on this title.Kalt Informational [Page 5]RFC 2811 Internet Relay Chat: Channel Management April 2000 In order to avoid the creation of duplicate channels (typically when the IRC network becomes disjoint because of a split between two servers), channel names SHOULD NOT be allowed to be reused by a user if a channel operator (See Section 2.4.1 (Channel Operators)) has recently left the channel because of a network split. If this happens, the channel name is temporarily unavailable. The duration while a channel remains unavailable should be tuned on a per IRC network basis. It is important to note that this prevents local users from creating a channel using the same name, but does not prevent the channel to be recreated by a remote user. The latter typically happens when the IRC network rejoins. Obviously, this mechanism only makes sense for channels which name begins with the character '#', but MAY be used for channels which name begins with the character '+'. This mechanism is commonly known as "Channel Delay".3.2 Safe Channels Unlike other channels, "safe channels" are not implicitly created. A user wishing to create such a channel MUST request the creation by sending a special JOIN command to the server in which the channel identifier (then unknown) is replaced by the character '!'. The creation process for this type of channel is strictly controlled. The user only chooses part of the channel name (known as the channel "short name"), the server automatically prepends the user provided name with a channel identifier consisting of five (5) characters. The channel name resulting from the combination of these two elements is unique, making the channel safe from abuses based on network splits. The user who creates such a channel automatically becomes "channel creator". See section 2.4.2 (Channel Creator) for more details on this title. A server MUST NOT allow the creation of a new channel if another channel with the same short name exists; or if another channel with the same short name existed recently AND any of its member(s) left because of a network split. Such channel ceases to exist after last user leaves AND no other member recently left the channel because of a network split. Unlike the mechanism described in section 5.2.2 (Channel Delay), in this case, channel names do not become unavailable: these channels may continue to exist after the last user left. Only the user creating the channel becomes "channel creator", users joining an existing empty channel do not automatically become "channel creator" nor "channel operator".Kalt Informational [Page 6]RFC 2811 Internet Relay Chat: Channel Management April 2000 To ensure the uniqueness of the channel names, the channel identifier created by the server MUST follow specific rules. For more details on this, see section 5.2.1 (Channel Identifier).4. Channel Modes The various modes available for channels are as follows: O - give "channel creator" status; o - give/take channel operator privilege; v - give/take the voice privilege; a - toggle the anonymous channel flag; i - toggle the invite-only channel flag;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -