X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=doc%2FCommands.txt;h=7765d3a440cc6fe4431081b10b34120d426defa8;hp=2d3cab2f3892bcbda76b38e8c0254aeb4561a4f2;hb=659d1264607e780708ace76181b0dc556b54e39a;hpb=628c14d65686c4c848a17381b8ef61c78dbcf405 diff --git a/doc/Commands.txt b/doc/Commands.txt index 2d3cab2f..7765d3a4 100644 --- a/doc/Commands.txt +++ b/doc/Commands.txt @@ -101,49 +101,117 @@ Connection Handling Commands - doc/Protocol.txt - NICK - NICK + NICK + NICK [] + NICK . - Change your nickname to . + Set or change the of a client (first form) and register + remote clients (second and third form; servers only). + + References: + - RFC 1459, 4.1.2 "Nick message" (old client and server protocol) + - RFC 2812, 3.1.2 "Nick message" (client protocol) + - RFC 2813, 4.1.3 "Nick" (server protocol) - PASS + PASS PASS [] . - Set a connection . This command must be sent before the - NICK/USER registration combination. + Set a connection . This command must be the first command + sent to the server, even before the NICK/USER or SERVER commands. . - See doc/Protocol.txt for more info. + The first form is used by user sessions or (old) RFC 1459 servers, + the second form is used by RFC 2812 or IRC+ compliant servers and + enables the server to indicate its version and supported protocol + features. + + References: + - RFC 1459, 4.1.1 "Password message" (old client and server protocol) + - RFC 2812, 3.1.1 "Password message" (client protocol) + - RFC 2813, 4.1.1 "Password message" (server protocol) + - doc/Protocol.txt - PING - PING [] + PING [] + . + Tests the presence of a connection to a client or server. . - Tests the presence of a connection. A PING message results in a PONG - reply. If is specified, the message gets passed on to it. + If no has been given, the local server is used. User clients + can only use other servers as , no user clients. + . + A PING message results in a PONG reply containing the , which + can be arbitrary text. + + Please note: + The RFCs state that the parameter is used to specify the + origin of the PING command when forwared in the network, but this + is not the case: the sender is specified using the prefix as usual, + and the parameter is used to identify the PONG reply in practice. + + References: + - RFC 2812, 3.7.2 "Ping message" - PONG - PONG [] + PONG [] + . + Reply to a "PING" command, indicate that the connection is alive. + . + The is the arbitrary text received in the "PING" command and + can be used to identify the correct PONG sent as answer. . - This command is a reply to the PING command and works in much the - same way. + When the "PONG" command is received from a user session, the + parameter is ignored; otherwise the PONG is forwarded to this client. + + References: + - RFC 2812, 3.7.3 "Pong message" - QUIT QUIT [] . - End IRC session and disconnect from the server. + Terminate a user session. . - If a has been given, it is displayed to all the - channels that you are a member of when leaving. + When received from a user, the server acknowledges this by sending + an "ERROR" message back to the client and terminates the connection. + . + When a has been given, it is sent to all the channels + that the client is a member of when leaving. + + References: + - RFC 2812, 3.1.7 "Quit" + - RFC 2813, 4.1.5 "Quit" - USER - USER + USER + . + Register (and authenticate) a new user session with a short + and a human-readable . . - This command is used at the beginning of a connection to specify the - name, hostname, and initial user of the - connecting client. + The parameter is only used when received by an other server + and ignored otherwise; and the parameter is always ignored. + But both parameters are required on each invocation by the protocol + and can be set to arbitrary characters/text when not used. . - may contain spaces, and thus must be prefixed with a colon. + If contains an "@" character, the full is used + for authentication, but only the first part up to this character is + set as "user name" for this session. + + References: + - RFC 2812, 3.1.3 "User message" - WEBIRC - See doc/Protocol.txt + WEBIRC + . + Allow Web-to-IRC gateway software (for example) to set the correct + user name and host name of users instead of their own. + . + It must be the very first command sent to the server, even before + USER and NICK commands! + . + The must be set in the server configuration file to prevent + unauthorized clients to fake their identity; it is an arbitrary string. + + References: + - doc/Protocol.txt, II.4: "Update webchat/proxy client information" General Commands @@ -184,21 +252,60 @@ General Commands See doc/Modes.txt for more information. - NOTICE - NOTICE + NOTICE [,[,...]] . - Send to (nick or channel). + Send a to a given , which can be a user or a + channel, but DON'T report any error. . - This command works similarly to PRIVMSG, except automatic replies must - never be sent in reply to NOTICE messages. + The "NOTICE" command exactly behaves like the "PRIVMSG" command, but + doesn't report any errors it encounters (like an unknown ). + Please see the help text of the "PRIVMSG" command for a detailed + description of the parameters! + + References: + - RFC 2812, 2.3.1 "Message format in Augmented BNF" + - RFC 2812, 3.3 "Sending messages" + - RFC 2812, 3.3.2 "Notice" - PRIVMSG - PRIVMSG + PRIVMSG [,[,...]] + . + Send a to a given , which can be a user or a + channel, and report all errors. + . + The must follow one of these syntax variants: + . + - + - + - [%]@ + - % + - !@ + . + If the is a user, a private message is sent directly to this + user; if it resolves to a channel name, a public message is sent + to all the members of that channel. . - Send to (nick or channel). + In addition, IRC Ops can use these two forms to specify the : . - Common IRC clients use MSG as PRIVMSG alias. - (Some clients use "QUERY []" to open a private chat.) + - # + - # + . + The can contain the wildcard characters "*" and "?", but must + contain at least one dot (".") and no wildcard after the last one. + Then, the is sent to all users matching this . + . + All warnings and errors are reported back to the initiator using + numeric status codes, which is the only difference to the "NOTICE" + command, which doesn't report back any errors or warnings at all. + . + Please note that clients often use "MSG" as an alias to PRIVMSG, and + a command "QUERY []" to initiate private chats. Both + are command extensions of the client and never sent to the server. + References: + - RFC 2812, 2.3.1 "Message format in Augmented BNF" + - RFC 2812, 3.3 "Sending messages" + - RFC 2812, 3.3.1 "Private messages" Status and Informational Commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -419,14 +526,17 @@ Channel Commands ~~~~~~~~~~~~~~~~ - INVITE - INVITE + INVITE . - Invites to . - does not have to exist, but if it does, only members of the - channel are allowed to invite other clients. + Invite to join channel . . - If the mode "+i" is set, only operators may invite - other clients. + does not have to exist, but if it does, only members of the + channel are allowed to invite other users. If the channel mode "+i" + is set, only channel "half-ops" (and above) may invite other clients, + and if channel mode "+V" is set, nobody can invite other users. + + References: + - RFC 2812, 3.2.7 "Invite message" - JOIN JOIN [] @@ -438,11 +548,18 @@ Channel Commands If the channel(s) do not exist, then they will be created. - KICK - KICK [] + KICK [,[,...]] [,[,...]] [] . - Remove from , optional with a . + Remove users(s) with (s) from (s). . - Only operators are able to KICK. + There must be either exactly one parameter and multiple + parameters, or as many parameters as there are + parameters. The is shown to the users being + kicked, and the nickname of the current user is used when + is omitted. + + References: + - RFC 2812, 3.2.8 "Kick command" - LIST LIST [ []] @@ -503,9 +620,16 @@ Administrative Commands To list the G-Lines, type "STATS g". - KILL - KILL + KILL . - Forcibly removes from the IRC network with a . + Forcibly remove all users with a given from the IRC + network and display the given to them. + . + This command is used internally between servers, too, for example + to disconnect duplicate 's after a "net split". + + References: + - RFC 2812, 3.7.1 "Kill message" - KLINE KLINE : @@ -542,6 +666,20 @@ IRC Service Commands ~~~~~~~~~~~~~~~~~~~~ - SERVICE + SERVICE + SERVICE {|+} + . + Register a new service in the network. + . + The first form is used by directly linked services and isn't supported + by ngIRCd at the moment. The second form announces services connected + to remote "pseudo-servers" ("services hubs"). + . + The and parameters are ignored by ngIRCd. + + References: + - RFC 2812, 3.1.6 "Service message" + - RFC 2813, 4.1.4 "Service message" - SERVLIST SERVLIST [ []] @@ -558,8 +696,39 @@ IRC Service Commands - RFC 2812, 3.5.1 "Servlist message" - SQUERY + SQUERY [,[,...]] + . + Send a to a given IRC service, and report all + errors. + . + The "SQUERY" command exactly behaves like the "PRIVMSG" command, but + enforces that the of the is an IRC service. + Please see the help text of the "PRIVMSG" command for a detailed + description of the parameters! + . + If a user wants to interact with IRC services, he should use "SQUERY" + instead of "PRIVMSG" or "NOTICE": only "SQUERY makes sure that no + regular user, which uses the nickname of an IRC service, receives + the command in error, for example during a "net split"! + + References: + - RFC 2812, 2.3.1 "Message format in Augmented BNF" + - RFC 2812, 3.3 "Sending messages" + - RFC 2812, 3.3.2 "Notice" - SVSNICK + SVSNICK + . + Forcefully change foreign user nicknames. This command is allowed + for servers only. + . + The "SVSNICK" command is forwarded to the server to which the user + with nickname is connected to, which in turn generates a + regular "NICK" command that then is sent to the client, so no special + support in the client software is required. + + References: + - ngIRCd GIT commit e3f300d3231f Server Protocol Commands @@ -576,11 +745,18 @@ Server Protocol Commands - ERROR ERROR [ [<> [...]]] . - Return an error message to the server. The first parameter, if given, - will be logged by the server, all further parameters are silently - ignored. + Inform a client or a server about an error condition. The first + parameter, if given, is logged by the server receiving the message, + all other parameters are silently ignored. . - This command is silently ignored on non-server and non-service links. + This command is silently ignored on non-server and non-service links + and shouldn't be used by regular IRC clients. + . + The ERROR message is also sent before terminating a regular client + connection. + + References: + - RFC 2812, 3.7.4 "Error message" - METADATA METADATA