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