]> jfr.im git - solanum.git/blob - doc/oper-guide/commands.rst
Remove ambiguity in descriptions +u
[solanum.git] / doc / oper-guide / commands.rst
1 Operator Commands
2 =================
3
4 Network management commands
5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
6
7 .. note:: All commands and names are case insensitive. Parameters
8 consisting of one or more separate letters, such as in ``MODE``,
9 ``STATS`` and ``WHO``, are case sensitive.
10
11 CONNECT
12 -------
13
14 ::
15
16 CONNECT target [port] [source]
17
18 Initiate a connection attempt to server target. If a port is given,
19 connect to that port on the target, otherwise use the one given in
20 ``ircd.conf``. If source is given, tell that server to initiate the
21 connection attempt, otherwise it will be made from the server you are
22 attached to.
23
24 To use the default port with source, specify 0 for port.
25
26 SQUIT
27 -----
28
29 ::
30
31 SQUIT server [reason]
32
33 Closes down the link to server from this side of the network. If a
34 reason is given, it will be sent out in the server notices on both sides
35 of the link.
36
37 REHASH
38 ------
39
40 ::
41
42 REHASH [BANS | DNS | MOTD | OMOTD | TKLINES | TDLINES | TXLINES | TRESVS | REJECTCACHE | HELP] [server]
43
44 With no parameter given, ``ircd.conf`` will be reread and parsed. The
45 server argument is a wildcard match of server names.
46
47 ``BANS``
48 Rereads ``kline.conf``, ``dline.conf``, ``xline.conf``,
49 ``resv.conf`` and their .perm variants
50
51 ``DNS``
52 Reread ``/etc/resolv.conf``.
53
54 ``MOTD``
55 Reload the ``MOTD`` file
56
57 ``OMOTD``
58 Reload the operator ``MOTD`` file
59
60 ``TKLINES``
61 Clears temporary ``K:lines``.
62
63 ``TDLINES``
64 Clears temporary ``D:lines``.
65
66 ``TXLINES``
67 Clears temporary ``X:lines``.
68
69 ``TRESVS``
70 Clears temporary reservations.
71
72 ``REJECTCACHE``
73 Clears the client rejection cache.
74
75 ``HELP``
76 Refreshes the help system cache.
77
78 RESTART
79 -------
80
81 ::
82
83 RESTART server
84
85 Cause an immediate total shutdown of the IRC server, and restart from
86 scratch as if it had just been executed.
87
88 This reexecutes the ircd using the compiled-in path, visible as ``SPATH`` in
89 ``INFO``.
90
91 .. note:: This command cannot be used remotely. The server name is
92 used only as a safety measure.
93
94 DIE
95 ---
96
97 ::
98
99 DIE server
100
101 Immediately terminate the IRC server, after sending notices to all
102 connected clients and servers
103
104 .. note:: This command cannot be used remotely. The server name is
105 used only as a safety measure.
106
107 SET
108 ---
109
110 ::
111
112 SET [ ADMINSTRING | AUTOCONN | AUTOCONNALL | FLOODCOUNT | IDENTTIMEOUT | MAX | OPERSTRING | SPAMNUM | SPAMTIME | SPLITMODE | SPLITNUM | SPLITUSERS ] value
113
114 The ``SET`` command sets a runtime-configurable value.
115
116 Most of the ``ircd.conf`` equivalents have a ``default_prefix`` and are
117 only read on startup. ``SET`` is the only way to change these at run time.
118
119 Most of the values can be queried by omitting value.
120
121 ``ADMINSTRING``
122 Sets string shown in ``WHOIS`` for admins. (umodes +o and +a set, umode
123 +S not set).
124
125 ``AUTOCONN``
126 Sets auto-connect on or off for a particular server. Takes two
127 parameters, server name and new state.
128
129 To see these values, use ``/stats c``. Changes to this are lost on a
130 rehash.
131
132 ``AUTOCONNALL``
133 Globally sets auto-connect on or off. If disabled, no automatic
134 connections are done; if enabled, automatic connections are done
135 following the rules for them.
136
137 ``FLOODCOUNT``
138 The number of lines allowed to be sent to a connection before
139 throttling it due to flooding. Note that this variable is used for
140 both channels and clients.
141
142 For channels, op or voice overrides this; for users, IRC operator
143 status or op or voice on a common channel overrides this.
144
145 ``IDENTTIMEOUT``
146 Timeout for requesting ident from a client.
147
148 ``MAX``
149 Sets the maximum number of connections to value.
150
151 This number cannot exceed maxconnections - ``MAX_BUFFER``.
152 maxconnections is the rlimit for number of open files. ``MAX_BUFFER``
153 is defined in config.h, normally 60.
154
155 ``MAXCLIENTS`` is an alias for this.
156
157 ``OPERSTRING``
158 Sets string shown in ``WHOIS`` for opers (umode ``+o`` set, umodes ``+a`` and ``+S``
159 not set).
160
161 ``SPAMNUM``
162 Sets how many join/parts to channels constitutes a possible spambot.
163
164 ``SPAMTIME``
165 Below this time on a channel counts as a join/part as above.
166
167 ``SPLITMODE``
168 Sets splitmode to value:
169
170 ``ON``
171 splitmode is permanently on
172
173 ``OFF``
174 splitmode is permanently off (default if ``no_create_on_split``
175 and ``no_join_on_split`` are disabled)
176
177 ``AUTO``
178 ircd chooses splitmode based on ``SPLITUSERS`` and ``SPLITNUM`` (default
179 if ``no_create_on_split`` or ``no_join_on_split`` are enabled)
180
181 ``SPLITUSERS``
182 Sets the minimum amount of users needed to deactivate automatic
183 splitmode.
184
185 ``SPLITNUM``
186 Sets the minimum amount of servers needed to deactivate automatic
187 splitmode. Only servers that have finished bursting count for this.
188
189 User management commands
190 ~~~~~~~~~~~~~~~~~~~~~~~~
191
192 KILL
193 ----
194
195 ::
196
197 KILL nick [reason]
198
199 Disconnects the user with the given nick from the server they are
200 connected to, with the reason given, if present, and broadcast a server
201 notice announcing this.
202
203 Your nick and the reason will appear on channels.
204
205 CLOSE
206 -----
207
208 Closes all connections from and to clients and servers who have not
209 completed registering.
210
211 KLINE
212 -----
213
214 ::
215
216 KLINE [length] [user@host | user@a.b.c.d] [ON servername] [:reason]
217
218 Adds a ``K:line`` to ``kline.conf`` to ban the given ``user@host`` from using
219 that server.
220
221 If the optional parameter length is given, the ``K:line`` will be temporary
222 (i.e. it will not be stored on disk) and last that long in minutes.
223
224 If an IP address is given, the ban will be against all hosts matching
225 that IP regardless of DNS. The IP address can be given as a full address
226 (``192.168.0.1``), as a CIDR mask (``192.168.0.0/24``), or as a glob
227 (``192.168.0.*``).
228
229 All clients matching the ``K:line`` will be disconnected from the server
230 immediately.
231
232 If a reason is specified, it will be sent to the client when they are
233 disconnected, and whenever a connection is attempted which is banned.
234
235 If the ON part is specified, the ``K:line`` is set on servers matching the
236 given mask (provided a matching ``shared{}`` block exists there). Otherwise,
237 if specified in a ``cluster{}`` block, the ``K:Line`` will be propagated across
238 the network accordingly.
239
240 UNKLINE
241 -------
242
243 ::
244
245 UNKLINE user@host [ON servername]
246
247 Will attempt to remove a ``K:line`` matching ``user@host`` from ``kline.conf``,
248 and will flush a temporary ``K:line``.
249
250 XLINE
251 -----
252
253 ::
254
255 XLINE [length] mask [ON servername] [:reason]
256
257 Works similarly to ``KLINE``, but matches against the real name field. The
258 wildcards are ``*`` (any sequence), ``?`` (any character), ``#`` (a digit) and ``@`` (a
259 letter); wildcard characters can be escaped with a backslash. The
260 sequence ``\s`` matches a space.
261
262 All clients matching the ``X:line`` will be disconnected from the server
263 immediately.
264
265 The reason is never sent to users. Instead, they will be exited with
266 "Bad user info".
267
268 If the ON part is specified, the ``X:line`` is set on servers matching the
269 given mask (provided a matching ``shared{}`` block exists there). Otherwise,
270 if specified in a ``cluster{}`` block, the ``X:line`` will be propagated across
271 the network accordingly.
272
273 UNXLINE
274 -------
275
276 ::
277
278 UNXLINE mask [ON servername]
279
280 Will attempt to remove an ``X:line`` from ``xline.conf``, and will flush a
281 temporary ``X:line``.
282
283 RESV
284 ----
285
286 ::
287
288 RESV [length] [channel | mask] [ON servername] [:reason]
289
290 If used on a channel, “jupes” the channel locally. Joins to the channel
291 will be disallowed and generate a server notice on ``+y``, and users will
292 not be able to send to the channel. Channel jupes cannot contain
293 wildcards.
294
295 If used on a nickname mask, prevents local users from using a nick
296 matching the mask (the same wildcard characters as xlines). There is no
297 way to exempt the initial nick from this.
298
299 In neither case will current users of the nick or channel be kicked or
300 disconnected.
301
302 This facility is not designed to make certain nicks or channels
303 oper-only.
304
305 The reason is never sent to users.
306
307 If the ON part is specified, the resv is set on servers matching the
308 given mask (provided a matching ``shared{}`` block exists there). Otherwise,
309 if specified in a ``cluster{}`` block, the resv will be propagated across
310 the network accordingly.
311
312 UNRESV
313 ------
314
315 ::
316
317 UNRESV [channel | mask] [ON servername]
318
319 Will attempt to remove a resv from ``resv.conf``, and will flush a
320 temporary resv.
321
322 DLINE
323 -----
324
325 ::
326
327 DLINE [length] a.b.c.d [ON servername] [:reason]
328
329 Adds a ``D:line`` to ``dline.conf``, which will deny any connections from
330 the given IP address. The IP address can be given as a full address
331 (``192.168.0.1``) or as a CIDR mask (``192.168.0.0/24``).
332
333 If the optional parameter length is given, the ``D:line`` will be temporary
334 (i.e. it will not be stored on disk) and last that long in minutes.
335
336 All clients matching the ``D:line`` will be disconnected from the server
337 immediately.
338
339 If a reason is specified, it will be sent to the client when they are
340 disconnected, and, if ``dline_reason`` is enabled, whenever a connection is
341 attempted which is banned.
342
343 ``D:lines`` are less load on a server, and may be more appropriate if
344 somebody is flooding connections.
345
346 If the ON part is specified, the ``D:line`` is set on servers matching the
347 given mask (provided a matching ``shared{}`` block exists there, which is
348 not the case by default). Otherwise, the D:Line will be set on the local
349 server only.
350
351 Only ``exempt{}`` blocks exempt from ``D:lines``. Being a server or having
352 ``kline_exempt`` in ``auth{}`` does *not* exempt (different from ``K/G/X:lines``).
353
354 UNDLINE
355 -------
356
357 ::
358
359 UNDLINE a.b.c.d [ON servername]
360
361 Will attempt to remove a ``D:line`` from ``dline.conf``, and will flush a
362 temporary ``D:line``.
363
364 TESTGECOS
365 ---------
366
367 ::
368
369 TESTGECOS gecos
370
371 Looks up X:Lines matching the given gecos.
372
373 TESTLINE
374 --------
375
376 ::
377
378 TESTLINE [nick!] [user@host | a.b.c.d]
379
380 Looks up the given hostmask or IP address and reports back on any ``auth{}``
381 blocks, D: or K: lines found. If nick is given, also searches for nick
382 resvs.
383
384 For temporary items the number of minutes until the item expires is
385 shown (as opposed to the hit count in STATS q/Q/x/X).
386
387 This command will not perform DNS lookups; for best results you must
388 testline a host and its IP form.
389
390 The given username should begin with a tilde (~) if identd is not in
391 use. As of charybdis 2.1.1, ``no_tilde`` and username truncation will be
392 taken into account like in the normal client access check.
393
394 As of charybdis 2.2.0, a channel name can be specified and the RESV will
395 be returned, if there is one.
396
397 TESTMASK
398 --------
399
400 ::
401
402 TESTMASK hostmask [gecos]
403
404 Searches the network for users that match the hostmask and gecos given,
405 returning the number of matching users on this server and other servers.
406
407 The hostmask is of the form user@host or user@ip/cidr with \* and ?
408 wildcards, optionally preceded by nick!.
409
410 The gecos field accepts the same wildcards as xlines.
411
412 The IP address checked against is ``255.255.255.255`` if the IP address is
413 unknown (remote client on a TS5 server) or 0 if the IP address is hidden
414 (``auth{}`` spoof).
415
416 LUSERS
417 ------
418
419 ::
420
421 LUSERS [mask] [nick | server]
422
423 Shows various user and channel counts.
424
425 The mask parameter is obsolete but must be used when querying a remote
426 server.
427
428 TRACE
429 -----
430
431 ::
432
433 TRACE [server | nick] [location]
434
435 With no argument or one argument which is the current server, TRACE
436 gives a list of all connections to the current server and a summary of
437 connection classes.
438
439 With one argument which is another server, TRACE displays the path to
440 the specified server, and all servers, opers and -i users on that
441 server, along with a summary of connection classes.
442
443 With one argument which is a client, TRACE displays the path to that
444 client, and that client's information.
445
446 If location is given, the command is executed on that server; no path is
447 displayed.
448
449 When listing connections, type, name and class is shown in addition to
450 information depending on the type:
451
452 Try.
453 A server we are trying to make a TCP connection to.
454
455 H.S.
456 A server we have established a TCP connection to, but is not yet
457 registered.
458
459 \?\?\?\?
460 An incoming connection that has not yet registered as a user or a
461 server (“unknown”). Shows the username, hostname, IP address and the
462 time the connection has been open. It is possible that the ident or
463 DNS lookups have not completed yet, and in any case no tildes are
464 shown here. Unknown connections may not have a name yet.
465
466 User
467 A registered unopered user. Shows the username, hostname, IP
468 address, the time the client has not sent anything (as in STATS l)
469 and the time the user has been idle (from PRIVMSG only, as in
470 WHOIS).
471
472 Oper
473 Like User, but opered.
474
475 Serv
476 A registered server. Shows the number of servers and users reached
477 via this link, who made this connection and the time the server has
478 not sent anything.
479
480 ETRACE
481 ------
482
483 ::
484
485 ETRACE [nick]
486
487 Shows client information about the given target, or about all local
488 clients if no target is specified.
489
490 PRIVS
491 -----
492
493 ::
494
495 PRIVS [nick]
496
497 Displays effective operator privileges for the specified nick, or for
498 yourself if no nick is given. This includes all privileges from the
499 operator block, the name of the operator block and those privileges from
500 the auth block that have an effect after the initial connection.
501
502 The exact output depends on the server the nick is on, see the matching
503 version of this document. If the remote server does not support this
504 extension, you will not receive a reply.
505
506 MASKTRACE
507 ---------
508
509 ::
510
511 MASKTRACE hostmask [gecos]
512
513 Searches the local server or network for users that match the hostmask
514 and gecos given. Network searches require the ``oper_spy`` privilege and an
515 '!' before the hostmask. The matching works the same way as TESTMASK.
516
517 The hostmask is of the form ``user@host`` or ``user@ip/cidr`` with ``*`` and ``?``
518 wildcards, optionally preceded by ``nick!``.
519
520 The gecos field accepts the same wildcards as xlines.
521
522 The IP address field contains ``255.255.255.255`` if the IP address is
523 unknown (remote client on a TS5 server) or ``0`` if the IP address is hidden
524 (``auth{}`` spoof).
525
526 CHANTRACE
527 ---------
528
529 ::
530
531 CHANTRACE channel
532
533 Displays information about users in a channel. Opers with the ``oper_spy``
534 privilege can get the information without being on the channel, by
535 prefixing the channel name with an ``!``.
536
537 The IP address field contains ``255.255.255.255`` if the IP address is
538 unknown (remote client on a TS5 server) or ``0`` if the IP address is hidden
539 (``auth{}`` spoof).
540
541 SCAN
542 ----
543
544 ::
545
546 SCAN UMODES +modes-modes [no-list] [list] [global] [list-max number] [mask nick!user@host]
547
548 Searches the local server or network for users that have the umodes
549 given with + and do not have the umodes given with -. no-list disables
550 the listing of matching users and only shows the count. list enables the
551 listing (default). global extends the search to the entire network
552 instead of local users only. list-max limits the listing of matching
553 users to the given amount. mask causes only users matching the given
554 nick!user@host mask to be selected. Only the displayed host is
555 considered, not the IP address or real host behind dynamic spoofs.
556
557 The IP address field contains ``255.255.255.255`` if the IP address is
558 unknown (remote client on a TS5 server) or 0 if the IP address is hidden
559 (``auth{}`` spoof).
560
561 Network searches where a listing is given are operspy commands.
562
563 CHGHOST
564 -------
565
566 ::
567
568 CHGHOST nick value
569
570 Set the hostname associated with a particular nick for the duration of
571 this session. This command is disabled by default because of the abuse
572 potential and little practical use.
573
574 Miscellaneous commands
575 ~~~~~~~~~~~~~~~~~~~~~~
576
577 ADMIN
578 -----
579
580 ::
581
582 ADMIN [nick | server]
583
584 Shows the information in the ``admin{}`` block.
585
586 INFO
587 ----
588
589 ::
590
591 INFO [nick | server]
592
593 Shows information about the authors of the IRC server, and some
594 information about this server instance. Opers also get a list of
595 configuration options.
596
597 TIME
598 ----
599
600 ::
601
602 TIME [nick | server]
603
604 Shows the local time on the given server, in a human-readable format.
605
606 VERSION
607 -------
608
609 ::
610
611 VERSION [nick | server]
612
613 Shows version information, a few compile/config options, the SID and the
614 005 numerics. The 005 numeric will be remapped to 105 for remote
615 requests.
616
617 STATS
618 -----
619
620 ::
621
622 STATS [type] [nick | server]
623
624 Display various statistics and configuration information.
625
626 A
627 Show DNS servers
628
629 b
630 Show active nick delays
631
632 B
633 Show hash statistics
634
635 c
636 Show connect blocks
637
638 d
639 Show temporary ``D:lines``
640
641 D
642 Show permanent ``D:lines``
643
644 e
645 Show exempt blocks (exceptions to ``D:lines``)
646
647 E
648 Show events
649
650 f
651 Show file descriptors
652
653 h
654 Show ``hub_mask``/``leaf_mask``
655
656 i
657 Show auth blocks, or matched auth blocks
658
659 k
660 Show temporary ``K:lines``, or matched ``K:lines``
661
662 K
663 Show permanent ``K:lines``, or matched ``K:lines``
664
665 l
666 Show hostname and link information about the given nick. With a
667 server name, show information about opers and servers on that
668 server; opers get information about all local connections if they
669 query their own server. No hostname is shown for server connections.
670
671 L
672 Like l, but show IP address instead of hostname
673
674 m
675 Show commands and their usage statistics (total counts, total bytes,
676 counts from server connections)
677
678 n
679 Show blacklist blocks (DNS blacklists) with hit counts since last
680 rehash and (parenthesized) reference counts. The reference count
681 shows how many clients are waiting on a lookup of this blacklist or
682 have been found and are waiting on registration to complete.
683
684 o
685 Show operator blocks
686
687 O
688 Show privset blocks
689
690 p
691 Show logged on network operators which are not set AWAY.
692
693 P
694 Show listen blocks (ports)
695
696 q
697 Show temporarily resv'ed nicks and channels with hit counts
698
699 Q
700 Show permanently resv'ed nicks and channels with hit counts since
701 last rehash bans
702
703 r
704 Show resource usage by the ircd
705
706 t
707 Show generic server statistics about local connections
708
709 u
710 Show server uptime
711
712 U
713 Show shared (c), cluster (C) and service (s) blocks
714
715 v
716 Show connected servers and brief status
717
718 x
719 Show temporary ``X:lines`` with hit counts
720
721 X
722 Show permanent ``X:lines`` with hit counts since last rehash bans
723
724 y
725 Show class blocks
726
727 z
728 Show memory usage statistics
729
730 Z
731 Show ziplinks statistics
732
733 ?
734 Show connected servers and link information about them
735
736 WALLOPS
737 -------
738
739 ::
740
741 WALLOPS :message
742
743 Sends a WALLOPS message to all users who have the +w umode set. This is
744 for things you don't mind the whole network knowing about.
745
746 OPERWALL
747 --------
748
749 ::
750
751 OPERWALL :message
752
753 Sends an OPERWALL message to all opers who have the +z umode set. +z is
754 restricted, OPERWALL should be considered private communications.