]> arthur.barton.de Git - ngircd-alex.git/blobdiff - doc/Commands.txt
Commands.txt: Update description of "PRIVMSG", "NOTICE", and "SQUERY"
[ngircd-alex.git] / doc / Commands.txt
index b282e2e772638e05b1f9c05246d0df3c2ec4e090..c54a724649915e821ed402c7b0e84c2dc06936de 100644 (file)
@@ -184,21 +184,60 @@ General Commands
        See doc/Modes.txt for more information.
 
 - NOTICE
        See doc/Modes.txt for more information.
 
 - NOTICE
-       NOTICE <target> <notice>
+       NOTICE <target>[,<target>[,...]] <message>
        .
        .
-       Send <notice> to <target> (nick or channel).
+       Send a <message> to a given <target>, 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 <target>).
+       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 <target> <message>
+       PRIVMSG <target>[,<target>[,...]] <message>
+       .
+       Send a <message> to a given <target>, which can be a user or a
+       channel, and report all errors.
+       .
+       The <target> must follow one of these syntax variants:
+       .
+        - <nickname>
+        - <channel>
+        - <user>[%<host>]@<server>
+        - <user>%<host>
+        - <nickname>!<user>@<host>
+       .
+       If the <target> 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.
+       .
+       In addition, IRC Ops can use these two forms to specify the <target>:
        .
        .
-       Send <message> to <target> (nick or channel).
+        - #<hostmask>
+        - #<servermask>
        .
        .
-       Common IRC clients use MSG as PRIVMSG alias.
-       (Some clients use "QUERY <nick> [<message>]" to open a private chat.)
+       The <mask> can contain the wildcard characters "*" and "?", but must
+       contain at least one dot (".") and no wildcard after the last one.
+       Then, the <message> is sent to all users matching this <mask>.
+       .
+       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 <nick> [<message>]" 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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Status and Informational Commands
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -210,7 +249,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.4.9 "Admin command"
 
        References:
         - RFC 2812, 3.4.9 "Admin command"
@@ -222,7 +261,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.4.10 "Info command"
 
        References:
         - RFC 2812, 3.4.10 "Info command"
@@ -231,7 +270,7 @@ Status and Informational Commands
        ISON <nickname> [<nickname> [...]]
        .
        Query online status of a list of nicknames. The server replies with
        ISON <nickname> [<nickname> [...]]
        .
        Query online status of a list of nicknames. The server replies with
-       a list only containing nicknes actually connected to a server in
+       a list only containing nicknames actually connected to a server in
        the network. If no nicknames of the given list are online, an empty
        list is returned to the client requesting the information.
 
        the network. If no nicknames of the given list are online, an empty
        list is returned to the client requesting the information.
 
@@ -263,7 +302,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        Please note that ngIRCd ignores the <mask> parameter entirely: it
        is not possible to get information for a part of the network only.
 
        Please note that ngIRCd ignores the <mask> parameter entirely: it
        is not possible to get information for a part of the network only.
@@ -278,7 +317,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.4.1 "Motd message"
 
        References:
         - RFC 2812, 3.4.1 "Motd message"
@@ -297,7 +336,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.2.5 "Names message"
 
        References:
         - RFC 2812, 3.2.5 "Names message"
@@ -318,7 +357,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.4.4 "Stats message"
 
        References:
         - RFC 2812, 3.4.4 "Stats message"
@@ -330,7 +369,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
 
        References
         - RFC 2812, 3.4.6 "Time message"
 
        References
         - RFC 2812, 3.4.6 "Time message"
@@ -345,7 +384,7 @@ Status and Informational Commands
        USERHOST <nickname> [<nickname> [...]]
        .
        Show flags and the hostmasks (<user>@<host>) of the <nickname>s,
        USERHOST <nickname> [<nickname> [...]]
        .
        Show flags and the hostmasks (<user>@<host>) of the <nickname>s,
-       seperated by spaces. The following flags are used:
+       separated by spaces. The following flags are used:
        .
         - "-"  The client is "away" (the mode "+a" is set on this client).
         - "+"  Client seems to be available, at least it isn't marked "away".
        .
         - "-"  The client is "away" (the mode "+a" is set on this client).
         - "+"  Client seems to be available, at least it isn't marked "away".
@@ -361,7 +400,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
        .
        <target> can be a server name, the nickname of a client connected to
        a specific server, or a mask matching a server name in the network.
-       The server of the current connecion is used when <target> is omitted.
+       The server of the current connection is used when <target> is omitted.
        .
        Please note: in normal operation, the version number ends in a dot
        (".", for example "ngIRCd-20.1."). If it ends in ".1" (for example
        .
        Please note: in normal operation, the version number ends in a dot
        (".", for example "ngIRCd-20.1."). If it ends in ".1" (for example
@@ -393,7 +432,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to a
        specific server, or a mask matching a server name in the network. The
        .
        <target> can be a server name, the nickname of a client connected to a
        specific server, or a mask matching a server name in the network. The
-       server of the current connecion is used when <target> is omitted.
+       server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.6.2 "Whois query"
 
        References:
         - RFC 2812, 3.6.2 "Whois query"
@@ -409,7 +448,7 @@ Status and Informational Commands
        .
        <target> can be a server name, the nickname of a client connected to a
        specific server, or a mask matching a server name in the network. The
        .
        <target> can be a server name, the nickname of a client connected to a
        specific server, or a mask matching a server name in the network. The
-       server of the current connecion is used when <target> is omitted.
+       server of the current connection is used when <target> is omitted.
 
        References:
         - RFC 2812, 3.6.3 "Whowas"
 
        References:
         - RFC 2812, 3.6.3 "Whowas"
@@ -419,14 +458,17 @@ Channel Commands
 ~~~~~~~~~~~~~~~~
 
 - INVITE
 ~~~~~~~~~~~~~~~~
 
 - INVITE
-       INVITE <nick> <channel>
+       INVITE <nickname> <channel>
        .
        .
-       Invites <nick> to <channel>.
-       <channel> does not have to exist, but if it does, only members of the
-       channel are allowed to invite other clients.
+       Invite <nickname> to join channel <channel>.
        .
        .
-       If the <channel> mode "+i" is set, only <channel> operators may invite
-       other clients.
+       <channel> 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 <channels> [<channel-keys>]
 
 - JOIN
        JOIN <channels> [<channel-keys>]
@@ -438,11 +480,18 @@ Channel Commands
        If the channel(s) do not exist, then they will be created.
 
 - KICK
        If the channel(s) do not exist, then they will be created.
 
 - KICK
-       KICK <channel> <nick> [<kick-message>]
+       KICK <channel>[,<channel>[,...]] <nickname>[,<nickname>[,...]] [<reason>]
        .
        .
-       Remove <nick> from <channel>, optional with a <kick-message>.
+       Remove users(s) with <nickname>(s) from <channel>(s).
        .
        .
-       Only <channel> operators are able to KICK.
+       There must be either exactly one <channel> parameter and multiple
+       <nickname> parameters, or as many <channel> parameters as there are
+       <nickname> parameters. The <reason> is shown to the users being
+       kicked, and the nickname of the current user is used when <reason>
+       is omitted.
+
+       References:
+        - RFC 2812, 3.2.8 "Kick command"
 
 - LIST
        LIST [<channels> [<server>]]
 
 - LIST
        LIST [<channels> [<server>]]
@@ -503,9 +552,16 @@ Administrative Commands
        To list the G-Lines, type "STATS g".
 
 - KILL
        To list the G-Lines, type "STATS g".
 
 - KILL
-       KILL <nick> <reason>
+       KILL <nickname> <reason>
        .
        .
-       Forcibly removes <nick> from the IRC network with a <reason>.
+       Forcibly remove all users with a given <nickname> from the IRC
+       network and display the given <reason> to them.
+       .
+       This command is used internally between servers, too, for example
+       to disconnect duplicate <nickname>'s after a "net split".
+
+       References:
+        - RFC 2812, 3.7.1 "Kill message"
 
 - KLINE
        KLINE <nick!user@hostmask> <seconds> :<reason>
 
 - KLINE
        KLINE <nick!user@hostmask> <seconds> :<reason>
@@ -558,6 +614,25 @@ IRC Service Commands
         - RFC 2812, 3.5.1 "Servlist message"
 
 - SQUERY
         - RFC 2812, 3.5.1 "Servlist message"
 
 - SQUERY
+       SQUERY <target>[,<target>[,...]] <message>
+       .
+       Send a <message> to a given <target> IRC service, and report all
+       errors.
+       .
+       The "SQUERY" command exactly behaves like the "PRIVMSG" command, but
+       enforces that the <target> of the <message> 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
 
@@ -576,11 +651,18 @@ Server Protocol Commands
 - ERROR
        ERROR [<message> [<> [...]]]
        .
 - ERROR
        ERROR [<message> [<> [...]]]
        .
-       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 <target> <key> <value>
 
 - METADATA
        METADATA <target> <key> <value>