📄 protocol
字号:
Numerics: RPL_NAMREPLY RPL_ENDOFNAMES Examples: NAMES #twilight_zone,#42 ; list visible users on #twilight_zone and #42 if the channels are visible to you. NAMES ; list all visible channels and users4.2.6 List message Command: LIST Parameters: [<channel>{,<channel>} [<server>]] The list message is used to list channels and their topics. If the <channel> parameter is used, only the status of that channel is displayed. Private channels are listed (without their topics) as channel "Prv" unless the client generating the query is actually on that channel. Likewise, secret channels are not listedOikarinen & Reed [Page 24]RFC 1459 Internet Relay Chat Protocol May 1993 at all unless the client is a member of the channel in question. Numeric Replies: ERR_NOSUCHSERVER RPL_LISTSTART RPL_LIST RPL_LISTEND Examples: LIST ; List all channels. LIST #twilight_zone,#42 ; List channels #twilight_zone and #424.2.7 Invite message Command: INVITE Parameters: <nickname> <channel> The INVITE message is used to invite users to a channel. The parameter <nickname> is the nickname of the person to be invited to the target channel <channel>. There is no requirement that the channel the target user is being invited to must exist or be a valid channel. To invite a user to a channel which is invite only (MODE +i), the client sending the invite must be recognised as being a channel operator on the given channel. Numeric Replies: ERR_NEEDMOREPARAMS ERR_NOSUCHNICK ERR_NOTONCHANNEL ERR_USERONCHANNEL ERR_CHANOPRIVSNEEDED RPL_INVITING RPL_AWAY Examples: :Angel INVITE Wiz #Dust ; User Angel inviting WiZ to channel #Dust INVITE Wiz #Twilight_Zone ; Command to invite WiZ to #Twilight_zone4.2.8 Kick command Command: KICK Parameters: <channel> <user> [<comment>] The KICK command can be used to forcibly remove a user from a channel. It 'kicks them out' of the channel (forced PART).Oikarinen & Reed [Page 25]RFC 1459 Internet Relay Chat Protocol May 1993 Only a channel operator may kick another user out of a channel. Each server that receives a KICK message checks that it is valid (ie the sender is actually a channel operator) before removing the victim from the channel. Numeric Replies: ERR_NEEDMOREPARAMS ERR_NOSUCHCHANNEL ERR_BADCHANMASK ERR_CHANOPRIVSNEEDED ERR_NOTONCHANNEL Examples:KICK &Melbourne Matthew ; Kick Matthew from &MelbourneKICK #Finnish John :Speaking English ; Kick John from #Finnish using "Speaking English" as the reason (comment).:WiZ KICK #Finnish John ; KICK message from WiZ to remove John from channel #FinnishNOTE: It is possible to extend the KICK command parameters to thefollowing:<channel>{,<channel>} <user>{,<user>} [<comment>]4.3 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. All servers connected must respond to these queries and respond correctly. Any invalid response (or lack thereof) must be considered a sign of a broken server and it must be disconnected/disabled as soon as possible until the situation is remedied. In these queries, where a parameter appears as "<server>", it will usually mean it can be a nickname or a server or a wildcard name of some sort. For each parameter, however, only one query and set of replies is to be generated.4.3.1 Version message Command: VERSION Parameters: [<server>]Oikarinen & Reed [Page 26]RFC 1459 Internet Relay Chat Protocol May 1993 The VERSION message is used to query the version of the server program. An optional parameter <server> is used to query the version of the server program which a client is not directly connected to. Numeric Replies: ERR_NOSUCHSERVER RPL_VERSION Examples: :Wiz VERSION *.se ; message from Wiz to check the version of a server matching "*.se" VERSION tolsun.oulu.fi ; check the version of server "tolsun.oulu.fi".4.3.2 Stats message Command: STATS Parameters: [<query> [<server>]] The stats message is used to query statistics of certain server. If <server> parameter is omitted, only the end of stats reply is sent back. The implementation of this command is highly dependent on the server which replies, although the server must be able to supply information as described by the queries below (or similar). A query may be given by any single letter which is only checked by the destination server (if given as the <server> parameter) and is otherwise passed on by intermediate servers, ignored and unaltered. The following queries are those found in the current IRC implementation and provide a large portion of the setup information for that server. Although these may not be supported in the same way by other versions, all servers should be able to supply a valid reply to a STATS query which is consistent with the reply formats currently used and the purpose of the query. The currently supported queries are: c - returns a list of servers which the server may connect to or allow connections from; h - returns a list of servers which are either forced to be treated as leaves or allowed to act as hubs; i - returns a list of hosts which the server allows a client to connect from; k - returns a list of banned username/hostname combinations for that server; l - returns a list of the server's connections, showing howOikarinen & Reed [Page 27]RFC 1459 Internet Relay Chat Protocol May 1993 long each connection has been established and the traffic over that connection in bytes and messages for each direction; m - returns a list of commands supported by the server and the usage count for each if the usage count is non zero; o - returns a list of hosts from which normal clients may become operators; y - show Y (Class) lines from server's configuration file; u - returns a string showing how long the server has been up. Numeric Replies: ERR_NOSUCHSERVER RPL_STATSCLINE RPL_STATSNLINE RPL_STATSILINE RPL_STATSKLINE RPL_STATSQLINE RPL_STATSLLINE RPL_STATSLINKINFO RPL_STATSUPTIME RPL_STATSCOMMANDS RPL_STATSOLINE RPL_STATSHLINE RPL_ENDOFSTATS Examples:STATS m ; check the command usage for the server you are connected to:Wiz STATS c eff.org ; request by WiZ for C/N line information from server eff.org4.3.3 Links message Command: LINKS Parameters: [[<remote server>] <server mask>] With LINKS, a user can list all servers 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 <remote server> is given in addition to <server mask>, 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:Oikarinen & Reed [Page 28]RFC 1459 Internet Relay Chat Protocol May 1993LINKS *.au ; list all servers which have a name that matches *.au;:WiZ LINKS *.bu.edu *.edu ; LINKS message from WiZ to the first server matching *.edu for a list of servers matching *.bu.edu.4.3.4 Time message Command: TIME Parameters: [<server>] The time message is used to query local time from the specified server. If the server parameter is not given, the server handling the command must reply to the query. Numeric Replies: ERR_NOSUCHSERVER RPL_TIME Examples: TIME tolsun.oulu.fi ; check the time on the server "tolson.oulu.fi" Angel TIME *.au ; user angel checking the time on a server matching "*.au"4.3.5 Connect message Command: CONNECT Parameters: <target server> [<port> [<remote server>]] The CONNECT command can be used to force a server to try to establish a new connection to another server immediately. CONNECT is a privileged command and is to be available only to IRC Operators. If a remote server is given then the CONNECT attempt is made by that server to <target server> and <port>. Numeric Replies: ERR_NOSUCHSERVER ERR_NOPRIVILEGES ERR_NEEDMOREPARAMS Examples:CONNECT tolsun.oulu.fi ; Attempt to connect a server to tolsun.oulu.fiOikarinen & Reed [Page 29]RFC 1459 Internet Relay Chat Protocol May 1993:WiZ CONNECT eff.org 6667 csd.bu.edu ; CONNECT attempt by WiZ to get servers eff.org and csd.bu.edu connected on port 6667.4.3.6 Trace message Command: TRACE Parameters: [<server>] 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 similar to that gained from using "traceroute". After sending this reply back, it must then send the TRACE message to the next server until given server is reached. If the <server> parameter is omitted, it is recommended that
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -