about summary refs log tree commit diff
path: root/doc/Commands.txt
blob: 431a410affaa4d9c92cd0d1ff0d7e5e8f936cbe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508

                     ngIRCd - Next Generation IRC Server
                           http://ngircd.barton.de/

               (c)2001-2013 Alexander Barton and Contributors.
               ngIRCd is free software and published under the
                   terms of the GNU General Public License.

                              -- Commands.txt --


This file lists all commands available on ngIRCd. It is written in a format
that is human readable as well as machine parseable and therefore can be used
as "help text file" of the daemon.

In short, the daemon reads this file on startup and parses it as following
when an user issues a "HELP <cmd>" command:

 1. Search the file for a line "- <cmd>",
 2. Output all subsequent lines that start with a TAB (ASCII 9) character
    to the client using NOTICE commands, treat lines containing a single "."
    after the TAB as empty lines.
 3. Break at the first line not starting with a TAB character.

This format allows to have information to each command stored in this file
which will not be sent to an IRC user requesting help which enables us to
have additional annotations stored here which further describe the origin,
implementation details, or limits of the specific command which are not
relevant to an end-user but administrators and developers.

A special "Intro" block is returned to the user when the HELP command is
used without a command name:


- Intro
	This is ngIRCd, a server software for Internet Relay Chat (IRC)
	networks. You can find more information about ngIRCd on its homepage:
		<http://ngircd.barton.de>
	.
	Use "HELP COMMANDS" to get a list of all available commands and
	"HELP <command-name>" to get help for a specific IRC command, for
	example "HELP quit" or "HELP privmsg".


Connection Handling Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- CAP
	CAP LS
	CAP LIST
	CAP REQ <capabilities>
	CAP ACK <capabilities>
	CAP NAK <capabilities>
	CAP CLEAR
	CAP END
	.
	List, request, and clear "IRC Capabilities".
	.
	Using this command, an IRC client can request additional "IRC
	capabilities" during login or later on, which influences the
	communication between server and client. Normally, these commands
	aren't directly used by humans, but automatically by their client
	software. And please note that issuing such commands manually can
	irritate the client software used, because of the "non-standard"
	behavior of the server!
	.
	- CAP LS: list all available capabilities.
	- CAP LIST: list active capabilities of this connection.
	- CAP REQ: Request particular capabilities.
	- CAP ACK: Acknowledge a set of capabilities to be enabled/disabled.
	- CAP NAK: Reject a set of capabilities.
	- CAP CLEAR: Clear all set capabilities.
	- CAP END: Indicate end of capability negotiation during login,
	  ignored in an fully registered session.

	Please note that the <capabilities> must be given in a single
	parameter but whitespace separated, therefore a command could look
	like this: "CAP REQ :capability1 capability2 capability3" for example.

	References:
	 - <http://ircv3.atheme.org/specification/capability-negotiation-3.1>
	 - <http://ngircd.barton.de/doc/Capabilities.txt>
	 - doc/Capabilities.txt

- CHARCONV
	CHARCONV <client-charset>
	.
	Set client character set encoding to <client-charset>.
	.
	After receiving such a command, the server translates all message
	data received from the client using the set <client-charset> to the
	server encoding (UTF-8), and all message data which is to be sent to
	the client from the server encoding (UTF-8) to <client-charset>.
	.
	This enables older clients and clients using "strange" character sets
	to transparently participate in channels and direct messages to
	clients using UTF-8, which should be the default today.

	References:
	 - <http://ngircd.barton.de/doc/Protocol.txt>
	 - doc/Protocol.txt

- NICK
	NICK <nick>
	.
	Change your nickname to <nick>.

- PASS
	PASS <password> <version> <flags> [<options>]
	.
	Set a connection <password>. This command must be sent before the
	NICK/USER registration combination.
	.
	See doc/Protocol.txt for more info.

- PING
	PING <server1> [<server2>]
	.
	Tests the presence of a connection. A PING message results in a PONG
	reply. If <server2> is specified, the message gets passed on to it.

- PONG
	PONG <server1> [<server2>]
	.
	This command is a reply to the PING command and works in much the
	same way.

- QUIT
	QUIT [<quit-message>]
	.
	End IRC session and disconnect from the server.
	.
	If a <quit-message> has been given, it is displayed to all the
	channels that you are a member of when leaving.

- USER
	USER <user> <modes> <realname>
	.
	This command is used at the beginning of a connection to specify the
	<user>name, hostname, <realname> and initial user <modes> of the
	connecting client.
	.
	<realname> may contain spaces, and thus must be prefixed with a colon.

- WEBIRC
	See doc/Protocol.txt


General Commands
~~~~~~~~~~~~~~~~

- AWAY
	AWAY [<message>]
	.
	Provides the server with a message to automatically send in reply to a
	PRIVMSG directed at the user, but not to a channel they are on.
	.
	If <message> is omitted, the away status is removed.

- HELP
	HELP [<command>]
	.
	Show help information for a specific IRC <command>. The <command> name
	is case-insensitive.
	.
	Use the command "HELP Commands" to get a list of all available commands.

	The HELP command isn't specified by any RFC but implemented by most
	daemons. If no help text could be read in, ngIRCd outputs a list of all
	implemented commands when receiving a plain "HELP" command as well as
	on "HELP Commands".

	ngIRCd replies using "NOTICE" commands like ircd 2.10/2.11; other
	implementations are using numerics 704, 705, and 706.


- MODE
	MODE <nickname> <flags> (user)
	MODE <channel> <flags> [<args>]
	.
	The MODE command is dual-purpose. It can be used to set both (user) and
	<channel> modes.
	.
	See doc/Modes.txt for more information.

- NOTICE
	NOTICE <target> <notice>
	.
	Send <notice> to <target> (nick or channel).
	.
	This command works similarly to PRIVMSG, except automatic replies must
	never be sent in reply to NOTICE messages.

- PRIVMSG
	PRIVMSG <target> <message>
	.
	Send <message> to <target> (nick or channel).
	.
	Common IRC clients use MSG as PRIVMSG alias.
	(Some clients use "QUERY <nick> [<message>]" to open a private chat.)


Status and Informational Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- ADMIN
	ADMIN [<server>]
	.
	Show administrative information about an IRC server in the network.
	If no server name has been given, the local server will respond.

- INFO
	INFO [<server>]
	.
	Show the version, birth & online time of the current IRC server.
	If <server> has been given, it shows the INFO of the specific <server>.

- ISON
	ISON <nicknames>
	.
	Queries the server to see if the clients in the space-separated list
	<nicknames> are currently on the network.
	.
	The server returns only the <nicknames> that are on the network in a
	space-separated list. If none of the clients are on the network the
	server returns an empty list.

- LINKS
	LINKS [<remote server> [<server mask>]]
	.
	Lists all server links matching <server mask>, if given,
	on <remote server>, or the current server if omitted.

- LUSERS
	LUSERS [<mask> [<server>]]
	.
	Return statistics about the size of the network. If called with no
	arguments, the statistics will reflect the entire network.
	.
	If <mask> is given, it will return only statistics reflecting the
	masked subset of the network.
	If <server> is given, the command will be forwarded to <server>
	for evaluation.

- MOTD
	MOTD [<server>]
	.
	Show "Message Of The Day" of the current server or specified <server>.

- NAMES
	NAMES [<channels> [<server>]]
	.
	Returns a list of who is on the comma-separated list of <channels>,
	by channel name.
	.
	If <channels> is omitted, all users are shown, grouped by channel name
	with all users who are not on a channel being shown as part of channel
	"*".
	If <server> is specified, the command is sent to <server> for
	evaluation.

- STATS
	STATS <flag> [<server>]
	.
	Returns statistics about the current server, or of a specified <server>.
	.
	STATS flags:
	.
	g = G-Lines (Network-wide bans)
	k = K-Lines (Server-local bans)
	l = Link status (Parent server and own link)
	m = IRC command status (usage count)
	u = Server uptime

- TIME
	TIME [<server>]
	.
	Show the local time of the current server, or of a specified <server>.

- TRACE
	TRACE [<server>]
	.
	Trace a path across the IRC network of the current server, or if given
	of a specific <server>, in a similar method to traceroute.

- USERHOST
	USERHOST <nicknames>
	.
	Show the user-host of <nicknames> (seperated by space).
	"-" means <nick> is away,
	"+" means <nick> is available,
	"*" indicates your connection.

- VERSION
	VERSION [<server>]
	.
	Show the ngIRCd version of the current server, or specified <server>.

- WHO
	WHO [<target> ["o"]]
	.
	Returns a list of users who match <target> (nick, hostmask or channel).
	.
	If the flag "o" is given, the server will only return information about
	IRC Operators.

- WHOIS
	WHOIS [<server>] <nicknames>
	.
	Returns information about the comma-separated list of <nicknames>.
	.
	If <server> is given, the command is forwarded to it for processing.

- WHOWAS
	WHOWAS <nickname> [<count> [<server>]]
	.
	Used to return information about <nicknames> that are no longer in use
	(due to client disconnection, or nickname changes).
	.
	If given, the server will return information from the last <count> times
	the nickname has been used.
	If <server> is given, the command is forwarded to it for processing.


Channel Commands
~~~~~~~~~~~~~~~~

- INVITE
	INVITE <nick> <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.
	.
	If the <channel> mode "+i" is set, only <channel> operators may invite
	other clients.

- JOIN
	JOIN <channels> [<channel-keys>]
	.
	Makes the client join the <channels> (comma-separated list), specifying
	the passwords, if needed, in the comma-separated <channel-keys> list.
	A <channel-key> is only needed, if the <channel> mode "+k" is set.
	.
	If the channel(s) do not exist, then they will be created.

- KICK
	KICK <channel> <nick> [<kick-message>]
	.
	Remove <nick> from <channel>, optional with a <kick-message>.
	.
	Only <channel> operators are able to KICK.

- LIST
	LIST [<channels> [<server>]]
	.
	List all visible <channels> (comma-seperated list) on the current
	server.
	If <server> is given, the command will be forwarded to <server> for
	evaluation.

- PART
	PART <channels> [<part-message>]
	.
	Leave <channels> (comma-separated list), optional with a
	<part-message>.

- TOPIC
	TOPIC <channel> <topic>
	.
	Set a <topic> for <channel>.
	.
	Only <channel> operators are able to set a <topic>.


Administrative Commands
~~~~~~~~~~~~~~~~~~~~~~~

- CONNECT
	CONNECT <target server> [<port> [<remote server> [<mypwd> <peerpwd>]]]
	.
	Instructs the current server, or <remote server> if specified,
	to connect to <target server>.
	.
	To connect <remote server> you need to have remote oper status.
	If <port> is omitted, it uses the server port of the configuration.
	If <mypwd> and <peerpwd> is given, it uses those passwords instead
	of the ones in the configuration.

- DIE
	DIE
	.
	Instructs the server to shut down.

- DISCONNECT
	DISCONNECT [<remote server>]
	.
	Disconnects the current server, or <remote server> if specified.
	To disconnect a <remote server> you need to have remote oper status.

- GLINE
	GLINE <nick!user@hostmask> <seconds> :<reason>
	.
	This command provides timed G-Lines (Network-wide bans).
	If a client matches a G-Line, it cannot connect to any server on
	the IRC network. If you put 0 as <seconds>, it makes the G-Line
	permanent.
	.
	To remove a G-Line, type "GLINE <nick!user@hostmask>".
	To list the G-Lines, type "STATS g".

- KILL
	KILL <nick> <reason>
	.
	Forcibly removes <nick> from the IRC network with a <reason>.

- KLINE
	KLINE <nick!user@hostmask> <seconds> :<reason>
	.
	This command provides timed K-Lines (Server-local bans).
	If a client matches a K-Line, it cannot connect to the issued server.
	If you put 0 as <seconds>, it makes the K-Line permanent.
	.
	To remove a K-Line, type "KLINE <nick!user@hostmask>".
	To list the K-Lines, type "STATS k".

- OPER
	OPER <user> <password>
	.
	Authenticates <user> as an IRC operator on the current server/network.

- REHASH
	REHASH
	.
	Causes the server to re-read and re-process its configuration file(s).

- RESTART
	RESTART
	.
	Restart the server.

- WALLOPS
	WALLOPS <message>
	.
	Sends <message> to all users with user mode "+w".


IRC Service Commands
~~~~~~~~~~~~~~~~~~~~

- SERVICE

- SERVLIST

- SQUERY

- SVSNICK


Server Protocol Commands
~~~~~~~~~~~~~~~~~~~~~~~~

- CHANINFO
	CHANINFO <channel> +<modes> [[<key> <limit>] <topic>]
	.
	CHANINFO is used by servers to inform each other about a channel:
	its modes, channel key, user limits and its topic.
	.
	See doc/Protocol.txt for more information.

- 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.
	.
	This command is silently ignored on non-server and non-service links.

- METADATA
	METADATA <target> <key> <value>
	.
	The METADATA command is used on server-links to update "metadata"
	information of clients, like the hostname, the info text ("real name"),
	or the user name.
	.
	See doc/Protocol.txt for more information.

- NJOIN

- SERVER

- SQUIT
	SQUIT <server>
	.
	Disconnects an IRC Server from the network.


Dummy Commands
~~~~~~~~~~~~~~

- SUMMON

- USERS

- GET

- POST