]> arthur.barton.de Git - ngircd-alex.git/blob - doc/Commands.txt
c54a724649915e821ed402c7b0e84c2dc06936de
[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>[,<target>[,...]] <message>
188         .
189         Send a <message> to a given <target>, which can be a user or a
190         channel, but DON'T report any error.
191         .
192         The "NOTICE" command exactly behaves like the "PRIVMSG" command, but
193         doesn't report any errors it encounters (like an unknown <target>).
194         Please see the help text of the "PRIVMSG" command for a detailed
195         description of the parameters!
196
197         References:
198          - RFC 2812, 2.3.1 "Message format in Augmented BNF"
199          - RFC 2812, 3.3 "Sending messages"
200          - RFC 2812, 3.3.2 "Notice"
201
202 - PRIVMSG
203         PRIVMSG <target>[,<target>[,...]] <message>
204         .
205         Send a <message> to a given <target>, which can be a user or a
206         channel, and report all errors.
207         .
208         The <target> must follow one of these syntax variants:
209         .
210          - <nickname>
211          - <channel>
212          - <user>[%<host>]@<server>
213          - <user>%<host>
214          - <nickname>!<user>@<host>
215         .
216         If the <target> is a user, a private message is sent directly to this
217         user; if it resolves to a channel name, a public message is sent
218         to all the members of that channel.
219         .
220         In addition, IRC Ops can use these two forms to specify the <target>:
221         .
222          - #<hostmask>
223          - #<servermask>
224         .
225         The <mask> can contain the wildcard characters "*" and "?", but must
226         contain at least one dot (".") and no wildcard after the last one.
227         Then, the <message> is sent to all users matching this <mask>.
228         .
229         All warnings and errors are reported back to the initiator using
230         numeric status codes, which is the only difference to the "NOTICE"
231         command, which doesn't report back any errors or warnings at all.
232         .
233         Please note that clients often use "MSG" as an alias to PRIVMSG, and
234         a command "QUERY <nick> [<message>]" to initiate private chats. Both
235         are command extensions of the client and never sent to the server.
236
237         References:
238          - RFC 2812, 2.3.1 "Message format in Augmented BNF"
239          - RFC 2812, 3.3 "Sending messages"
240          - RFC 2812, 3.3.1 "Private messages"
241
242 Status and Informational Commands
243 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
244
245 - ADMIN
246         ADMIN [<target>]
247         .
248         Show administrative information about an IRC server in the network.
249         .
250         <target> can be a server name, the nickname of a client connected to
251         a specific server, or a mask matching a server name in the network.
252         The server of the current connection is used when <target> is omitted.
253
254         References:
255          - RFC 2812, 3.4.9 "Admin command"
256
257 - INFO
258         INFO [<target>]
259         .
260         Show the version, birth & online time of an IRC server in the network.
261         .
262         <target> can be a server name, the nickname of a client connected to
263         a specific server, or a mask matching a server name in the network.
264         The server of the current connection is used when <target> is omitted.
265
266         References:
267          - RFC 2812, 3.4.10 "Info command"
268
269 - ISON
270         ISON <nickname> [<nickname> [...]]
271         .
272         Query online status of a list of nicknames. The server replies with
273         a list only containing nicknames actually connected to a server in
274         the network. If no nicknames of the given list are online, an empty
275         list is returned to the client requesting the information.
276
277         Please note that "all" IRC daemons even parse separate nicknames in
278         a single parameter (like ":nick1 nick2"), and therefore ngIRCd
279         implements this behaviour, too.
280
281         References:
282          - RFC 2812, 4.9 "Ison message"
283
284 - LINKS
285         LINKS [[<target>] [<mask>]
286         .
287         List all servers currently registered in the network matching <mask>,
288         or all servers if <mask> has been omitted, as seen by the server
289         specified by <target> or the local server when <target> is omitted.
290         .
291         <target> can be a server name, the nickname of a client connected to
292         a specific server, or a mask matching a server name in the network.
293
294         References:
295          - RFC 2812, 3.4.5 "Links message"
296
297 - LUSERS
298         LUSERS [<mask> [<target>]]
299         .
300         Return statistics about the number of clients (users, servers,
301         services, ...) in the network as seen by the server <target>.
302         .
303         <target> can be a server name, the nickname of a client connected to
304         a specific server, or a mask matching a server name in the network.
305         The server of the current connection is used when <target> is omitted.
306
307         Please note that ngIRCd ignores the <mask> parameter entirely: it
308         is not possible to get information for a part of the network only.
309
310         References:
311          - RFC 2812, 3.4.2 "Lusers message"
312
313 - MOTD
314         MOTD [<target>]
315         .
316         Show the "Message of the Day" (MOTD) of an IRC server in the network.
317         .
318         <target> can be a server name, the nickname of a client connected to
319         a specific server, or a mask matching a server name in the network.
320         The server of the current connection is used when <target> is omitted.
321
322         References:
323          - RFC 2812, 3.4.1 "Motd message"
324
325 - NAMES
326         NAMES [<channel>[,<channel>[,...]] [<target>]]
327         .
328         Show the list of users that are members of a particular <channel>
329         (and that are visible for the client requesting this information) as
330         seen by the server <target>. More than one <channel> can be given
331         separated by "," (but not whitespaces!).
332         .
333         If <channel> has been omitted, all visible users are shown, grouped
334         by channel name, and all visible users not being members of at least
335         one channel are shown as members of the pseudo channel "*".
336         .
337         <target> can be a server name, the nickname of a client connected to
338         a specific server, or a mask matching a server name in the network.
339         The server of the current connection is used when <target> is omitted.
340
341         References:
342          - RFC 2812, 3.2.5 "Names message"
343
344 - STATS
345         STATS [<query> [<target>]]
346         .
347         Show statistics and other information of type <query> of a particular
348         IRC server in the network.
349         .
350         The following <query> types are supported (case-insensitive):
351         .
352          - g  Network-wide bans ("G-Lines").
353          - k  Server-local bans ("K-Lines").
354          - l  Link status (parent server and own link only).
355          - m  Command usage count.
356          - u  Server uptime.
357         .
358         <target> can be a server name, the nickname of a client connected to
359         a specific server, or a mask matching a server name in the network.
360         The server of the current connection is used when <target> is omitted.
361
362         References:
363          - RFC 2812, 3.4.4 "Stats message"
364
365 - TIME
366         TIME [<target>]
367         .
368         Show the local time of an IRC server in the network.
369         .
370         <target> can be a server name, the nickname of a client connected to
371         a specific server, or a mask matching a server name in the network.
372         The server of the current connection is used when <target> is omitted.
373
374         References
375          - RFC 2812, 3.4.6 "Time message"
376
377 - TRACE
378         TRACE [<server>]
379         .
380         Trace a path across the IRC network of the current server, or if given
381         of a specific <server>, in a similar method to traceroute.
382
383 - USERHOST
384         USERHOST <nickname> [<nickname> [...]]
385         .
386         Show flags and the hostmasks (<user>@<host>) of the <nickname>s,
387         separated by spaces. The following flags are used:
388         .
389          - "-"  The client is "away" (the mode "+a" is set on this client).
390          - "+"  Client seems to be available, at least it isn't marked "away".
391          - "*"  The client is an IRC operator (the mode "+o" is set).
392
393         References:
394          - RFC 2812, 4.8 "Userhost message"
395
396 - VERSION
397         VERSION [<target>]
398         .
399         Show version information about a particular IRC server in the network.
400         .
401         <target> can be a server name, the nickname of a client connected to
402         a specific server, or a mask matching a server name in the network.
403         The server of the current connection is used when <target> is omitted.
404         .
405         Please note: in normal operation, the version number ends in a dot
406         (".", for example "ngIRCd-20.1."). If it ends in ".1" (for example
407         "ngIRCd-20.1.1", same version than before!), the server is running in
408         debug-mode; and if it ends in ".2", the "network sniffer" is active!
409         Keep your privacy in mind ...
410
411         References:
412          - RFC 2812, 3.4.3 "Version message"
413
414 - WHO
415         WHO [<mask> ["o"]]
416         .
417         Show a list of users who match the <mask>, or all visible users when
418         the <mask> has been omitted. (Special case: the <mask> "0" is
419         equivalent to "*")
420         .
421         If the flag "o" is given, the server will only return information about
422         IRC Operators.
423
424         References:
425          - RFC 2812, 3.6.1 "Who query"
426
427 - WHOIS
428         WHOIS [<target>] <mask>[,<mask>[,...]]
429         .
430         Query information about users matching the <mask> parameter(s) as seen
431         by the server <target>; up to 3 <masks> are supported.
432         .
433         <target> can be a server name, the nickname of a client connected to a
434         specific server, or a mask matching a server name in the network. The
435         server of the current connection is used when <target> is omitted.
436
437         References:
438          - RFC 2812, 3.6.2 "Whois query"
439
440 - WHOWAS
441         WHOWAS <nickname>[,<nickname>[,...]] [<count> [<target>]]
442         .
443         Query information about nicknames no longer in use in the network,
444         either because of nickname changes or disconnects. The history is
445         searched backwards, returning the most recent entry first. If there
446         are multiple entries, up to <count> entries will be shown (or all of
447         them, if no <count> has been given).
448         .
449         <target> can be a server name, the nickname of a client connected to a
450         specific server, or a mask matching a server name in the network. The
451         server of the current connection is used when <target> is omitted.
452
453         References:
454          - RFC 2812, 3.6.3 "Whowas"
455
456
457 Channel Commands
458 ~~~~~~~~~~~~~~~~
459
460 - INVITE
461         INVITE <nickname> <channel>
462         .
463         Invite <nickname> to join channel <channel>.
464         .
465         <channel> does not have to exist, but if it does, only members of the
466         channel are allowed to invite other users. If the channel mode "+i"
467         is set, only channel "half-ops" (and above) may invite other clients,
468         and if channel mode "+V" is set, nobody can invite other users.
469
470         References:
471          - RFC 2812, 3.2.7 "Invite message"
472
473 - JOIN
474         JOIN <channels> [<channel-keys>]
475         .
476         Makes the client join the <channels> (comma-separated list), specifying
477         the passwords, if needed, in the comma-separated <channel-keys> list.
478         A <channel-key> is only needed, if the <channel> mode "+k" is set.
479         .
480         If the channel(s) do not exist, then they will be created.
481
482 - KICK
483         KICK <channel>[,<channel>[,...]] <nickname>[,<nickname>[,...]] [<reason>]
484         .
485         Remove users(s) with <nickname>(s) from <channel>(s).
486         .
487         There must be either exactly one <channel> parameter and multiple
488         <nickname> parameters, or as many <channel> parameters as there are
489         <nickname> parameters. The <reason> is shown to the users being
490         kicked, and the nickname of the current user is used when <reason>
491         is omitted.
492
493         References:
494          - RFC 2812, 3.2.8 "Kick command"
495
496 - LIST
497         LIST [<channels> [<server>]]
498         .
499         List all visible <channels> (comma-seperated list) on the current
500         server.
501         If <server> is given, the command will be forwarded to <server> for
502         evaluation.
503
504 - PART
505         PART <channels> [<part-message>]
506         .
507         Leave <channels> (comma-separated list), optional with a
508         <part-message>.
509
510 - TOPIC
511         TOPIC <channel> <topic>
512         .
513         Set a <topic> for <channel>.
514         .
515         Only <channel> operators are able to set a <topic>.
516
517
518 Administrative Commands
519 ~~~~~~~~~~~~~~~~~~~~~~~
520
521 - CONNECT
522         CONNECT <target server> [<port> [<remote server> [<mypwd> <peerpwd>]]]
523         .
524         Instructs the current server, or <remote server> if specified,
525         to connect to <target server>.
526         .
527         To connect <remote server> you need to have remote oper status.
528         If <port> is omitted, it uses the server port of the configuration.
529         If <mypwd> and <peerpwd> is given, it uses those passwords instead
530         of the ones in the configuration.
531
532 - DIE
533         DIE
534         .
535         Instructs the server to shut down.
536
537 - DISCONNECT
538         DISCONNECT [<remote server>]
539         .
540         Disconnects the current server, or <remote server> if specified.
541         To disconnect a <remote server> you need to have remote oper status.
542
543 - GLINE
544         GLINE <nick!user@hostmask> <seconds> :<reason>
545         .
546         This command provides timed G-Lines (Network-wide bans).
547         If a client matches a G-Line, it cannot connect to any server on
548         the IRC network. If you put 0 as <seconds>, it makes the G-Line
549         permanent.
550         .
551         To remove a G-Line, type "GLINE <nick!user@hostmask>".
552         To list the G-Lines, type "STATS g".
553
554 - KILL
555         KILL <nickname> <reason>
556         .
557         Forcibly remove all users with a given <nickname> from the IRC
558         network and display the given <reason> to them.
559         .
560         This command is used internally between servers, too, for example
561         to disconnect duplicate <nickname>'s after a "net split".
562
563         References:
564          - RFC 2812, 3.7.1 "Kill message"
565
566 - KLINE
567         KLINE <nick!user@hostmask> <seconds> :<reason>
568         .
569         This command provides timed K-Lines (Server-local bans).
570         If a client matches a K-Line, it cannot connect to the issued server.
571         If you put 0 as <seconds>, it makes the K-Line permanent.
572         .
573         To remove a K-Line, type "KLINE <nick!user@hostmask>".
574         To list the K-Lines, type "STATS k".
575
576 - OPER
577         OPER <user> <password>
578         .
579         Authenticates <user> as an IRC operator on the current server/network.
580
581 - REHASH
582         REHASH
583         .
584         Causes the server to re-read and re-process its configuration file(s).
585
586 - RESTART
587         RESTART
588         .
589         Restart the server.
590
591 - WALLOPS
592         WALLOPS <message>
593         .
594         Sends <message> to all users with user mode "+w".
595
596
597 IRC Service Commands
598 ~~~~~~~~~~~~~~~~~~~~
599
600 - SERVICE
601
602 - SERVLIST
603         SERVLIST [<mask> [<type>]]
604         .
605         List all IRC services currently registered in the network.
606         .
607         The optional <mask> and <type> parameters can be used to limit the
608         listing to services matching the <mask> and that are of type <type>.
609         .
610         Please note that ngIRCd doesn't use any service types at the moment
611         and therefore all services are of type "0".
612
613         References:
614          - RFC 2812, 3.5.1 "Servlist message"
615
616 - SQUERY
617         SQUERY <target>[,<target>[,...]] <message>
618         .
619         Send a <message> to a given <target> IRC service, and report all
620         errors.
621         .
622         The "SQUERY" command exactly behaves like the "PRIVMSG" command, but
623         enforces that the <target> of the <message> is an IRC service.
624         Please see the help text of the "PRIVMSG" command for a detailed
625         description of the parameters!
626         .
627         If a user wants to interact with IRC services, he should use "SQUERY"
628         instead of "PRIVMSG" or "NOTICE": only "SQUERY makes sure that no
629         regular user, which uses the nickname of an IRC service, receives
630         the command in error, for example during a "net split"!
631
632         References:
633          - RFC 2812, 2.3.1 "Message format in Augmented BNF"
634          - RFC 2812, 3.3 "Sending messages"
635          - RFC 2812, 3.3.2 "Notice"
636
637 - SVSNICK
638
639
640 Server Protocol Commands
641 ~~~~~~~~~~~~~~~~~~~~~~~~
642
643 - CHANINFO
644         CHANINFO <channel> +<modes> [[<key> <limit>] <topic>]
645         .
646         CHANINFO is used by servers to inform each other about a channel:
647         its modes, channel key, user limits and its topic.
648         .
649         See doc/Protocol.txt for more information.
650
651 - ERROR
652         ERROR [<message> [<> [...]]]
653         .
654         Inform a client or a server about an error condition. The first 
655         parameter, if given, is logged by the server receiving the message,
656         all other parameters are silently ignored.
657         .
658         This command is silently ignored on non-server and non-service links
659         and shouldn't be used by regular IRC clients.
660         .
661         The ERROR message is also sent before terminating a regular client
662         connection.
663
664         References:
665          - RFC 2812, 3.7.4 "Error message"
666
667 - METADATA
668         METADATA <target> <key> <value>
669         .
670         The METADATA command is used on server-links to update "metadata"
671         information of clients, like the hostname, the info text ("real name"),
672         or the user name.
673         .
674         See doc/Protocol.txt for more information.
675
676 - NJOIN
677
678 - SERVER
679
680 - SQUIT
681         SQUIT <server>
682         .
683         Disconnects an IRC Server from the network.
684
685
686 Dummy Commands
687 ~~~~~~~~~~~~~~
688
689 - SUMMON
690         SUMMON <user> [<target> [<channel>]]
691         .
692         This command was intended to call people into IRC who are directly
693         connected to the terminal console of the IRC server -- but is
694         deprecated today. Therefore ngIRCd doesn't really implement this
695         command and always returns an error message, regardless of the
696         parameters given.
697
698         References:
699          - RFC 2812, 4.5 "Summon message"
700
701 - USERS
702         USERS [<target>]
703         .
704         This command was intended to list users directly logged in into the
705         console of the IRC server -- but is deprecated today. Therefore ngIRCd
706         doesn't really implement this command and always returns an error
707         message, regardless of the parameters given.
708
709         References:
710          - RFC 2812, 4.6 "Users"
711
712 - GET
713
714 - POST