]> arthur.barton.de Git - ngircd-alex.git/blob - doc/Commands.txt
Commands.txt: Add description for the "CAP" command
[ngircd-alex.git] / doc / Commands.txt
1
2                      ngIRCd - Next Generation IRC Server
3                            http://ngircd.barton.de/
4
5                (c)2001-2013 Alexander Barton and Contributors.
6                ngIRCd is free software and published under the
7                    terms of the GNU General Public License.
8
9                               -- Commands.txt --
10
11
12 This file lists all commands available on ngIRCd. It is written in a format
13 that is human readable as well as machine parseable and therefore can be used
14 as "help text file" of the daemon.
15
16 In short, the daemon reads this file on startup and parses it as following
17 when an user issues a "HELP <cmd>" command:
18
19  1. Search the file for a line "- <cmd>",
20  2. Output all subsequent lines that start with a TAB (ASCII 9) character
21     to the client using NOTICE commands, treat lines containing a single "."
22     after the TAB as empty lines.
23  3. Break at the first line not starting with a TAB character.
24
25 This format allows to have information to each command stored in this file
26 which will not be sent to an IRC user requesting help which enables us to
27 have additional annotations stored here which further describe the origin,
28 implementation details, or limits of the specific command which are not
29 relevant to an end-user but administrators and developers.
30
31 A special "Intro" block is returned to the user when the HELP command is
32 used without a command name:
33
34
35 - Intro
36         This is ngIRCd, a server software for Internet Relay Chat (IRC)
37         networks. You can find more information about ngIRCd on its homepage:
38                 <http://ngircd.barton.de>
39         .
40         Use "HELP COMMANDS" to get a list of all available commands and
41         "HELP <command-name>" to get help for a specific IRC command, for
42         example "HELP quit" or "HELP privmsg".
43
44
45 Connection Handling Commands
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
48 - CAP
49         CAP LS
50         CAP LIST
51         CAP REQ <capabilities>
52         CAP ACK <capabilities>
53         CAP NAK <capabilities>
54         CAP CLEAR
55         CAP END
56         .
57         List, request, and clear "IRC Capabilities".
58         .
59         Using this command, an IRC client can request additional "IRC
60         capabilities" during login or later on, which influences the
61         communication between server and client. Normally, these commands
62         aren't directly used by humans, but automatically by their client
63         software. And please note that issuing such commands manually can
64         irritate the client software used, because of the "non-standard"
65         behavior of the server!
66         .
67         - CAP LS: list all available capabilities.
68         - CAP LIST: list active capabilities of this connection.
69         - CAP REQ: Request particular capabilities.
70         - CAP ACK: Acknowledge a set of capabilities to be enabled/disabled.
71         - CAP NAK: Reject a set of capabilities.
72         - CAP CLEAR: Clear all set capabilities.
73         - CAP END: Indicate end of capability negotiation during login,
74           ignored in an fully registered session.
75
76         Please note that the <capabilities> must be given in a single
77         parameter but whitespace separated, therefore a command could look
78         like this: "CAP REQ :capability1 capability2 capability3" for example.
79
80         References:
81          - <http://ircv3.atheme.org/specification/capability-negotiation-3.1>
82          - <http://ngircd.barton.de/doc/Capabilities.txt>
83          - doc/Capabilities.txt
84
85 - CHARCONV
86         See doc/Protocol.txt
87
88 - NICK
89         NICK <nick>
90         .
91         Change your nickname to <nick>.
92
93 - PASS
94         PASS <password> <version> <flags> [<options>]
95         .
96         Set a connection <password>. This command must be sent before the
97         NICK/USER registration combination.
98         .
99         See doc/Protocol.txt for more info.
100
101 - PING
102         PING <server1> [<server2>]
103         .
104         Tests the presence of a connection. A PING message results in a PONG
105         reply. If <server2> is specified, the message gets passed on to it.
106
107 - PONG
108         PONG <server1> [<server2>]
109         .
110         This command is a reply to the PING command and works in much the
111         same way.
112
113 - QUIT
114         QUIT [<quit-message>]
115         .
116         End IRC session and disconnect from the server.
117         .
118         If a <quit-message> has been given, it is displayed to all the
119         channels that you are a member of when leaving.
120
121 - USER
122         USER <user> <modes> <realname>
123         .
124         This command is used at the beginning of a connection to specify the
125         <user>name, hostname, <realname> and initial user <modes> of the
126         connecting client.
127         .
128         <realname> may contain spaces, and thus must be prefixed with a colon.
129
130 - WEBIRC
131         See doc/Protocol.txt
132
133
134 General Commands
135 ~~~~~~~~~~~~~~~~
136
137 - AWAY
138         AWAY [<message>]
139         .
140         Provides the server with a message to automatically send in reply to a
141         PRIVMSG directed at the user, but not to a channel they are on.
142         .
143         If <message> is omitted, the away status is removed.
144
145 - HELP
146         HELP [<command>]
147         .
148         Show help information for a specific IRC <command>. The <command> name
149         is case-insensitive.
150         .
151         Use the command "HELP Commands" to get a list of all available commands.
152
153         The HELP command isn't specified by any RFC but implemented by most
154         daemons. If no help text could be read in, ngIRCd outputs a list of all
155         implemented commands when receiving a plain "HELP" command as well as
156         on "HELP Commands".
157
158         ngIRCd replies using "NOTICE" commands like ircd 2.10/2.11; other
159         implementations are using numerics 704, 705, and 706.
160
161
162 - MODE
163         MODE <nickname> <flags> (user)
164         MODE <channel> <flags> [<args>]
165         .
166         The MODE command is dual-purpose. It can be used to set both (user) and
167         <channel> modes.
168         .
169         See doc/Modes.txt for more information.
170
171 - NOTICE
172         NOTICE <target> <notice>
173         .
174         Send <notice> to <target> (nick or channel).
175         .
176         This command works similarly to PRIVMSG, except automatic replies must
177         never be sent in reply to NOTICE messages.
178
179 - PRIVMSG
180         PRIVMSG <target> <message>
181         .
182         Send <message> to <target> (nick or channel).
183         .
184         Common IRC clients use MSG as PRIVMSG alias.
185         (Some clients use "QUERY <nick> [<message>]" to open a private chat.)
186
187
188 Status and Informational Commands
189 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
191 - ADMIN
192         ADMIN [<server>]
193         .
194         Show administrative information about an IRC server in the network.
195         If no server name has been given, the local server will respond.
196
197 - INFO
198         INFO [<server>]
199         .
200         Show the version, birth & online time of the current IRC server.
201         If <server> has been given, it shows the INFO of the specific <server>.
202
203 - ISON
204         ISON <nicknames>
205         .
206         Queries the server to see if the clients in the space-separated list
207         <nicknames> are currently on the network.
208         .
209         The server returns only the <nicknames> that are on the network in a
210         space-separated list. If none of the clients are on the network the
211         server returns an empty list.
212
213 - LINKS
214         LINKS [<remote server> [<server mask>]]
215         .
216         Lists all server links matching <server mask>, if given,
217         on <remote server>, or the current server if omitted.
218
219 - LUSERS
220         LUSERS [<mask> [<server>]]
221         .
222         Return statistics about the size of the network. If called with no
223         arguments, the statistics will reflect the entire network.
224         .
225         If <mask> is given, it will return only statistics reflecting the
226         masked subset of the network.
227         If <server> is given, the command will be forwarded to <server>
228         for evaluation.
229
230 - MOTD
231         MOTD [<server>]
232         .
233         Show "Message Of The Day" of the current server or specified <server>.
234
235 - NAMES
236         NAMES [<channels> [<server>]]
237         .
238         Returns a list of who is on the comma-separated list of <channels>,
239         by channel name.
240         .
241         If <channels> is omitted, all users are shown, grouped by channel name
242         with all users who are not on a channel being shown as part of channel
243         "*".
244         If <server> is specified, the command is sent to <server> for
245         evaluation.
246
247 - STATS
248         STATS <flag> [<server>]
249         .
250         Returns statistics about the current server, or of a specified <server>.
251         .
252         STATS flags:
253         .
254         g = G-Lines (Network-wide bans)
255         k = K-Lines (Server-local bans)
256         l = Link status (Parent server and own link)
257         m = IRC command status (usage count)
258         u = Server uptime
259
260 - TIME
261         TIME [<server>]
262         .
263         Show the local time of the current server, or of a specified <server>.
264
265 - TRACE
266         TRACE [<server>]
267         .
268         Trace a path across the IRC network of the current server, or if given
269         of a specific <server>, in a similar method to traceroute.
270
271 - USERHOST
272         USERHOST <nicknames>
273         .
274         Show the user-host of <nicknames> (seperated by space).
275         "-" means <nick> is away,
276         "+" means <nick> is available,
277         "*" indicates your connection.
278
279 - VERSION
280         VERSION [<server>]
281         .
282         Show the ngIRCd version of the current server, or specified <server>.
283
284 - WHO
285         WHO [<target> ["o"]]
286         .
287         Returns a list of users who match <target> (nick, hostmask or channel).
288         .
289         If the flag "o" is given, the server will only return information about
290         IRC Operators.
291
292 - WHOIS
293         WHOIS [<server>] <nicknames>
294         .
295         Returns information about the comma-separated list of <nicknames>.
296         .
297         If <server> is given, the command is forwarded to it for processing.
298
299 - WHOWAS
300         WHOWAS <nickname> [<count> [<server>]]
301         .
302         Used to return information about <nicknames> that are no longer in use
303         (due to client disconnection, or nickname changes).
304         .
305         If given, the server will return information from the last <count> times
306         the nickname has been used.
307         If <server> is given, the command is forwarded to it for processing.
308
309
310 Channel Commands
311 ~~~~~~~~~~~~~~~~
312
313 - INVITE
314         INVITE <nick> <channel>
315         .
316         Invites <nick> to <channel>.
317         <channel> does not have to exist, but if it does, only members of the
318         channel are allowed to invite other clients.
319         .
320         If the <channel> mode "+i" is set, only <channel> operators may invite
321         other clients.
322
323 - JOIN
324         JOIN <channels> [<channel-keys>]
325         .
326         Makes the client join the <channels> (comma-separated list), specifying
327         the passwords, if needed, in the comma-separated <channel-keys> list.
328         A <channel-key> is only needed, if the <channel> mode "+k" is set.
329         .
330         If the channel(s) do not exist, then they will be created.
331
332 - KICK
333         KICK <channel> <nick> [<kick-message>]
334         .
335         Remove <nick> from <channel>, optional with a <kick-message>.
336         .
337         Only <channel> operators are able to KICK.
338
339 - LIST
340         LIST [<channels> [<server>]]
341         .
342         List all visible <channels> (comma-seperated list) on the current
343         server.
344         If <server> is given, the command will be forwarded to <server> for
345         evaluation.
346
347 - PART
348         PART <channels> [<part-message>]
349         .
350         Leave <channels> (comma-separated list), optional with a
351         <part-message>.
352
353 - TOPIC
354         TOPIC <channel> <topic>
355         .
356         Set a <topic> for <channel>.
357         .
358         Only <channel> operators are able to set a <topic>.
359
360
361 Administrative Commands
362 ~~~~~~~~~~~~~~~~~~~~~~~
363
364 - CONNECT
365         CONNECT <target server> [<port> [<remote server> [<mypwd> <peerpwd>]]]
366         .
367         Instructs the current server, or <remote server> if specified,
368         to connect to <target server>.
369         .
370         To connect <remote server> you need to have remote oper status.
371         If <port> is omitted, it uses the server port of the configuration.
372         If <mypwd> and <peerpwd> is given, it uses those passwords instead
373         of the ones in the configuration.
374
375 - DIE
376         DIE
377         .
378         Instructs the server to shut down.
379
380 - DISCONNECT
381         DISCONNECT [<remote server>]
382         .
383         Disconnects the current server, or <remote server> if specified.
384         To disconnect a <remote server> you need to have remote oper status.
385
386 - GLINE
387         GLINE <nick!user@hostmask> <seconds> :<reason>
388         .
389         This command provides timed G-Lines (Network-wide bans).
390         If a client matches a G-Line, it cannot connect to any server on
391         the IRC network. If you put 0 as <seconds>, it makes the G-Line
392         permanent.
393         .
394         To remove a G-Line, type "GLINE <nick!user@hostmask>".
395         To list the G-Lines, type "STATS g".
396
397 - KILL
398         KILL <nick> <reason>
399         .
400         Forcibly removes <nick> from the IRC network with a <reason>.
401
402 - KLINE
403         KLINE <nick!user@hostmask> <seconds> :<reason>
404         .
405         This command provides timed K-Lines (Server-local bans).
406         If a client matches a K-Line, it cannot connect to the issued server.
407         If you put 0 as <seconds>, it makes the K-Line permanent.
408         .
409         To remove a K-Line, type "KLINE <nick!user@hostmask>".
410         To list the K-Lines, type "STATS k".
411
412 - OPER
413         OPER <user> <password>
414         .
415         Authenticates <user> as an IRC operator on the current server/network.
416
417 - REHASH
418         REHASH
419         .
420         Causes the server to re-read and re-process its configuration file(s).
421
422 - RESTART
423         RESTART
424         .
425         Restart the server.
426
427 - WALLOPS
428         WALLOPS <message>
429         .
430         Sends <message> to all users with user mode "+w".
431
432
433 IRC Service Commands
434 ~~~~~~~~~~~~~~~~~~~~
435
436 - SERVICE
437
438 - SERVLIST
439
440 - SQUERY
441
442 - SVSNICK
443
444
445 Server Protocol Commands
446 ~~~~~~~~~~~~~~~~~~~~~~~~
447
448 - CHANINFO
449         CHANINFO <channel> +<modes> [[<key> <limit>] <topic>]
450         .
451         CHANINFO is used by servers to inform each other about a channel:
452         its modes, channel key, user limits and its topic.
453         .
454         See doc/Protocol.txt for more information.
455
456 - ERROR
457         ERROR [<message> [<> [...]]]
458         .
459         Return an error message to the server. The first parameter, if given,
460         will be logged by the server, all further parameters are silently
461         ignored.
462         .
463         This command is silently ignored on non-server and non-service links.
464
465 - METADATA
466         METADATA <target> <key> <value>
467         .
468         The METADATA command is used on server-links to update "metadata"
469         information of clients, like the hostname, the info text ("real name"),
470         or the user name.
471         .
472         See doc/Protocol.txt for more information.
473
474 - NJOIN
475
476 - SERVER
477
478 - SQUIT
479         SQUIT <server>
480         .
481         Disconnects an IRC Server from the network.
482
483
484 Dummy Commands
485 ~~~~~~~~~~~~~~
486
487 - SUMMON
488
489 - USERS
490
491 - GET
492
493 - POST