]> arthur.barton.de Git - ngircd-alex.git/blob - doc/Commands.txt
Commands.txt: Update description of the "MOTD" 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         CHARCONV <client-charset>
87         .
88         Set client character set encoding to <client-charset>.
89         .
90         After receiving such a command, the server translates all message
91         data received from the client using the set <client-charset> to the
92         server encoding (UTF-8), and all message data which is to be sent to
93         the client from the server encoding (UTF-8) to <client-charset>.
94         .
95         This enables older clients and clients using "strange" character sets
96         to transparently participate in channels and direct messages to
97         clients using UTF-8, which should be the default today.
98
99         References:
100          - <http://ngircd.barton.de/doc/Protocol.txt>
101          - doc/Protocol.txt
102
103 - NICK
104         NICK <nick>
105         .
106         Change your nickname to <nick>.
107
108 - PASS
109         PASS <password> <version> <flags> [<options>]
110         .
111         Set a connection <password>. This command must be sent before the
112         NICK/USER registration combination.
113         .
114         See doc/Protocol.txt for more info.
115
116 - PING
117         PING <server1> [<server2>]
118         .
119         Tests the presence of a connection. A PING message results in a PONG
120         reply. If <server2> is specified, the message gets passed on to it.
121
122 - PONG
123         PONG <server1> [<server2>]
124         .
125         This command is a reply to the PING command and works in much the
126         same way.
127
128 - QUIT
129         QUIT [<quit-message>]
130         .
131         End IRC session and disconnect from the server.
132         .
133         If a <quit-message> has been given, it is displayed to all the
134         channels that you are a member of when leaving.
135
136 - USER
137         USER <user> <modes> <realname>
138         .
139         This command is used at the beginning of a connection to specify the
140         <user>name, hostname, <realname> and initial user <modes> of the
141         connecting client.
142         .
143         <realname> may contain spaces, and thus must be prefixed with a colon.
144
145 - WEBIRC
146         See doc/Protocol.txt
147
148
149 General Commands
150 ~~~~~~~~~~~~~~~~
151
152 - AWAY
153         AWAY [<message>]
154         .
155         Provides the server with a message to automatically send in reply to a
156         PRIVMSG directed at the user, but not to a channel they are on.
157         .
158         If <message> is omitted, the away status is removed.
159
160 - HELP
161         HELP [<command>]
162         .
163         Show help information for a specific IRC <command>. The <command> name
164         is case-insensitive.
165         .
166         Use the command "HELP Commands" to get a list of all available commands.
167
168         The HELP command isn't specified by any RFC but implemented by most
169         daemons. If no help text could be read in, ngIRCd outputs a list of all
170         implemented commands when receiving a plain "HELP" command as well as
171         on "HELP Commands".
172
173         ngIRCd replies using "NOTICE" commands like ircd 2.10/2.11; other
174         implementations are using numerics 704, 705, and 706.
175
176
177 - MODE
178         MODE <nickname> <flags> (user)
179         MODE <channel> <flags> [<args>]
180         .
181         The MODE command is dual-purpose. It can be used to set both (user) and
182         <channel> modes.
183         .
184         See doc/Modes.txt for more information.
185
186 - NOTICE
187         NOTICE <target> <notice>
188         .
189         Send <notice> to <target> (nick or channel).
190         .
191         This command works similarly to PRIVMSG, except automatic replies must
192         never be sent in reply to NOTICE messages.
193
194 - PRIVMSG
195         PRIVMSG <target> <message>
196         .
197         Send <message> to <target> (nick or channel).
198         .
199         Common IRC clients use MSG as PRIVMSG alias.
200         (Some clients use "QUERY <nick> [<message>]" to open a private chat.)
201
202
203 Status and Informational Commands
204 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205
206 - ADMIN
207         ADMIN [<target>]
208         .
209         Show administrative information about an IRC server in the network.
210         .
211         <target> can be a server name, the nickname of a client connected to
212         a specific server, or a mask matching a server name in the network.
213         The server of the current connecion is used when <target> is omitted.
214
215         References:
216          - RFC 2812, 3.4.9 "Admin command"
217
218 - INFO
219         INFO [<target>]
220         .
221         Show the version, birth & online time of an IRC server in the network.
222         .
223         <target> can be a server name, the nickname of a client connected to
224         a specific server, or a mask matching a server name in the network.
225         The server of the current connecion is used when <target> is omitted.
226
227         References:
228          - RFC 2812, 3.4.10 "Info command"
229
230 - ISON
231         ISON <nickname> [<nickname> [...]]
232         .
233         Query online status of a list of nicknames. The server replies with
234         a list only containing nicknes actually connected to a server in
235         the network. If no nicknames of the given list are online, an empty
236         list is returned to the client requesting the information.
237
238         Please note that "all" IRC daemons even parse separate nicknames in
239         a single parameter (like ":nick1 nick2"), and therefore ngIRCd
240         implements this behaviour, too.
241
242         References:
243          - RFC 2812, 4.9 "Ison message"
244
245 - LINKS
246         LINKS [[<target>] [<mask>]
247         .
248         List all servers currently registered in the network matching <mask>,
249         or all servers if <mask> has been omitted, as seen by the server
250         specified by <target> or the local server when <target> is omitted.
251         .
252         <target> can be a server name, the nickname of a client connected to
253         a specific server, or a mask matching a server name in the network.
254
255         References:
256          - RFC 2812, 3.4.5 "Links message"
257
258 - LUSERS
259         LUSERS [<mask> [<target>]]
260         .
261         Return statistics about the number of clients (users, servers,
262         services, ...) in the network as seen by the server <target>.
263         .
264         <target> can be a server name, the nickname of a client connected to
265         a specific server, or a mask matching a server name in the network.
266         The server of the current connecion is used when <target> is omitted.
267
268         Please note that ngIRCd ignores the <mask> parameter entirely: it
269         is not possible to get information for a part of the network only.
270
271         References:
272          - RFC 2812, 3.4.2 "Lusers message"
273
274 - MOTD
275         MOTD [<target>]
276         .
277         Show the "Message of the Day" (MOTD) of an IRC server in the network.
278         .
279         <target> can be a server name, the nickname of a client connected to
280         a specific server, or a mask matching a server name in the network.
281         The server of the current connecion is used when <target> is omitted.
282
283         References:
284          - RFC 2812, 3.4.1 "Motd message"
285
286 - NAMES
287         NAMES [<channels> [<server>]]
288         .
289         Returns a list of who is on the comma-separated list of <channels>,
290         by channel name.
291         .
292         If <channels> is omitted, all users are shown, grouped by channel name
293         with all users who are not on a channel being shown as part of channel
294         "*".
295         If <server> is specified, the command is sent to <server> for
296         evaluation.
297
298 - STATS
299         STATS <flag> [<server>]
300         .
301         Returns statistics about the current server, or of a specified <server>.
302         .
303         STATS flags:
304         .
305         g = G-Lines (Network-wide bans)
306         k = K-Lines (Server-local bans)
307         l = Link status (Parent server and own link)
308         m = IRC command status (usage count)
309         u = Server uptime
310
311 - TIME
312         TIME [<server>]
313         .
314         Show the local time of the current server, or of a specified <server>.
315
316 - TRACE
317         TRACE [<server>]
318         .
319         Trace a path across the IRC network of the current server, or if given
320         of a specific <server>, in a similar method to traceroute.
321
322 - USERHOST
323         USERHOST <nicknames>
324         .
325         Show the user-host of <nicknames> (seperated by space).
326         "-" means <nick> is away,
327         "+" means <nick> is available,
328         "*" indicates your connection.
329
330 - VERSION
331         VERSION [<server>]
332         .
333         Show the ngIRCd version of the current server, or specified <server>.
334
335 - WHO
336         WHO [<target> ["o"]]
337         .
338         Returns a list of users who match <target> (nick, hostmask or channel).
339         .
340         If the flag "o" is given, the server will only return information about
341         IRC Operators.
342
343 - WHOIS
344         WHOIS [<server>] <nicknames>
345         .
346         Returns information about the comma-separated list of <nicknames>.
347         .
348         If <server> is given, the command is forwarded to it for processing.
349
350 - WHOWAS
351         WHOWAS <nickname> [<count> [<server>]]
352         .
353         Used to return information about <nicknames> that are no longer in use
354         (due to client disconnection, or nickname changes).
355         .
356         If given, the server will return information from the last <count> times
357         the nickname has been used.
358         If <server> is given, the command is forwarded to it for processing.
359
360
361 Channel Commands
362 ~~~~~~~~~~~~~~~~
363
364 - INVITE
365         INVITE <nick> <channel>
366         .
367         Invites <nick> to <channel>.
368         <channel> does not have to exist, but if it does, only members of the
369         channel are allowed to invite other clients.
370         .
371         If the <channel> mode "+i" is set, only <channel> operators may invite
372         other clients.
373
374 - JOIN
375         JOIN <channels> [<channel-keys>]
376         .
377         Makes the client join the <channels> (comma-separated list), specifying
378         the passwords, if needed, in the comma-separated <channel-keys> list.
379         A <channel-key> is only needed, if the <channel> mode "+k" is set.
380         .
381         If the channel(s) do not exist, then they will be created.
382
383 - KICK
384         KICK <channel> <nick> [<kick-message>]
385         .
386         Remove <nick> from <channel>, optional with a <kick-message>.
387         .
388         Only <channel> operators are able to KICK.
389
390 - LIST
391         LIST [<channels> [<server>]]
392         .
393         List all visible <channels> (comma-seperated list) on the current
394         server.
395         If <server> is given, the command will be forwarded to <server> for
396         evaluation.
397
398 - PART
399         PART <channels> [<part-message>]
400         .
401         Leave <channels> (comma-separated list), optional with a
402         <part-message>.
403
404 - TOPIC
405         TOPIC <channel> <topic>
406         .
407         Set a <topic> for <channel>.
408         .
409         Only <channel> operators are able to set a <topic>.
410
411
412 Administrative Commands
413 ~~~~~~~~~~~~~~~~~~~~~~~
414
415 - CONNECT
416         CONNECT <target server> [<port> [<remote server> [<mypwd> <peerpwd>]]]
417         .
418         Instructs the current server, or <remote server> if specified,
419         to connect to <target server>.
420         .
421         To connect <remote server> you need to have remote oper status.
422         If <port> is omitted, it uses the server port of the configuration.
423         If <mypwd> and <peerpwd> is given, it uses those passwords instead
424         of the ones in the configuration.
425
426 - DIE
427         DIE
428         .
429         Instructs the server to shut down.
430
431 - DISCONNECT
432         DISCONNECT [<remote server>]
433         .
434         Disconnects the current server, or <remote server> if specified.
435         To disconnect a <remote server> you need to have remote oper status.
436
437 - GLINE
438         GLINE <nick!user@hostmask> <seconds> :<reason>
439         .
440         This command provides timed G-Lines (Network-wide bans).
441         If a client matches a G-Line, it cannot connect to any server on
442         the IRC network. If you put 0 as <seconds>, it makes the G-Line
443         permanent.
444         .
445         To remove a G-Line, type "GLINE <nick!user@hostmask>".
446         To list the G-Lines, type "STATS g".
447
448 - KILL
449         KILL <nick> <reason>
450         .
451         Forcibly removes <nick> from the IRC network with a <reason>.
452
453 - KLINE
454         KLINE <nick!user@hostmask> <seconds> :<reason>
455         .
456         This command provides timed K-Lines (Server-local bans).
457         If a client matches a K-Line, it cannot connect to the issued server.
458         If you put 0 as <seconds>, it makes the K-Line permanent.
459         .
460         To remove a K-Line, type "KLINE <nick!user@hostmask>".
461         To list the K-Lines, type "STATS k".
462
463 - OPER
464         OPER <user> <password>
465         .
466         Authenticates <user> as an IRC operator on the current server/network.
467
468 - REHASH
469         REHASH
470         .
471         Causes the server to re-read and re-process its configuration file(s).
472
473 - RESTART
474         RESTART
475         .
476         Restart the server.
477
478 - WALLOPS
479         WALLOPS <message>
480         .
481         Sends <message> to all users with user mode "+w".
482
483
484 IRC Service Commands
485 ~~~~~~~~~~~~~~~~~~~~
486
487 - SERVICE
488
489 - SERVLIST
490
491 - SQUERY
492
493 - SVSNICK
494
495
496 Server Protocol Commands
497 ~~~~~~~~~~~~~~~~~~~~~~~~
498
499 - CHANINFO
500         CHANINFO <channel> +<modes> [[<key> <limit>] <topic>]
501         .
502         CHANINFO is used by servers to inform each other about a channel:
503         its modes, channel key, user limits and its topic.
504         .
505         See doc/Protocol.txt for more information.
506
507 - ERROR
508         ERROR [<message> [<> [...]]]
509         .
510         Return an error message to the server. The first parameter, if given,
511         will be logged by the server, all further parameters are silently
512         ignored.
513         .
514         This command is silently ignored on non-server and non-service links.
515
516 - METADATA
517         METADATA <target> <key> <value>
518         .
519         The METADATA command is used on server-links to update "metadata"
520         information of clients, like the hostname, the info text ("real name"),
521         or the user name.
522         .
523         See doc/Protocol.txt for more information.
524
525 - NJOIN
526
527 - SERVER
528
529 - SQUIT
530         SQUIT <server>
531         .
532         Disconnects an IRC Server from the network.
533
534
535 Dummy Commands
536 ~~~~~~~~~~~~~~
537
538 - SUMMON
539
540 - USERS
541
542 - GET
543
544 - POST