]> git.somenet.org - root/pub/somesible.git/blob - roles/server/irc-services/files/default/operserv.conf
roles/server/irc-services/files
[root/pub/somesible.git] / roles / server / irc-services / files / default / operserv.conf
1 #
2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2025 by someone <someone@somenet.org>
7 #
8
9 /*
10  * First, create the service.
11  */
12 service
13 {
14         /*
15          * The name of the OperServ client.
16          * If you change this value, you probably want to change the client directive in the configuration for the operserv module too.
17          */
18         nick = "OperServ"
19
20         /*
21          * The username of the OperServ client.
22          */
23         user = "services"
24
25         /*
26          * The hostname of the OperServ client.
27          */
28         host = "services.host"
29
30         /*
31          * The realname of the OperServ client.
32          */
33         gecos = "Operator Service"
34
35         /*
36          * The modes this client should use.
37          * Do not modify this unless you know what you are doing.
38          *
39          * These modes are very IRCd specific. If left commented, sane defaults
40          * are used based on what protocol module you have loaded.
41          *
42          * Note that setting this option incorrectly could potentially BREAK some, if
43          * not all, usefulness of the client. We will not support you if this client is
44          * unable to do certain things if this option is enabled.
45          */
46         #modes = "+o"
47
48         /*
49          * An optional comma separated list of channels this service should join. Outside
50          * of log channels this is not very useful, as the service will just idle in the
51          * specified channels, and will not accept any types of commands.
52          *
53          * Prefixes may be given to the channels in the form of mode characters or prefix symbols.
54          */
55         #channels = "@#services,#mychan"
56 }
57
58 /*
59  * Core OperServ module.
60  *
61  * Provides essential functionality for OperServ.
62  */
63 module
64 {
65         name = "operserv"
66
67         /*
68          * The name of the client that should be OperServ.
69          */
70         client = "OperServ"
71
72         /*
73          * These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
74          * and SQLINEs.
75          */
76         autokillexpiry = 30d
77         chankillexpiry = 30d
78         snlineexpiry = 30d
79         sqlineexpiry = 30d
80
81         /*
82          * If set, this option will make Services send an AKILL command immediately after it has been
83          * added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
84          * been added.
85          *
86          * This directive is optional, but recommended.
87          */
88         akillonadd = yes
89
90         /*
91          * If set, this option will make Services send an (SVS)KILL command immediately after SNLINE ADD.
92          * This eliminates the need for killing the user after the SNLINE has been added.
93          *
94          * This directive is optional.
95          */
96         killonsnline = yes
97
98         /*
99          * If set, this option will make Services send an (SVS)KILL command immediately after SQLINE ADD.
100          * This eliminates the need for killing the user after the SQLINE has been added.
101          *
102          * This directive is optional.
103          */
104         killonsqline = yes
105
106         /*
107          * Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
108          *
109          * This directive is optional.
110          */
111         addakiller = yes
112
113         /*
114          * Adds akill IDs to akills. Akill IDs are given to users in their ban reason and can be used to easily view,
115          * modify, or remove an akill from the ID.
116          */
117         akillids = yes
118
119         /*
120          * If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
121          *
122          * This directive is optional, but recommended.
123          */
124         opersonly = yes
125 }
126
127 /*
128  * Core OperServ commands.
129  *
130  * In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
131  * are loaded you can then configure the commands to be added to any client you like with any name you like.
132  *
133  * Additionally, you may provide a permission name that must be in the opertype of users executing the command.
134  *
135  * Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
136  */
137
138 /* Give it a help command. */
139 command { service = "OperServ"; name = "HELP"; command = "generic/help"; }
140
141 /*
142  * os_akill
143  *
144  * Provides the command operserv/akill.
145  *
146  * Used to ban users from the network.
147  */
148 module { name = "os_akill" }
149 command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; permission = "operserv/akill"; }
150
151 /*
152  * os_chankill
153  *
154  * Provides the command operserv/chankill.
155  *
156  * Used to akill users from an entire channel.
157  */
158 module { name = "os_chankill" }
159 command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"; permission = "operserv/chankill"; }
160
161 /*
162  * os_defcon
163  *
164  * Provides the command operserv/defcon.
165  *
166  * Allows you to set services in DefCon mode, which can be used to restrict services access
167  * during bot attacks.
168  */
169 #module
170 {
171         name = "os_defcon"
172
173         /*
174          * Default DefCon level (1-5) to use when starting Services up. Level 5 constitutes normal operation
175          * while level 1 constitutes the most restrictive operation. If this setting is left out or set to
176          * 0, DefCon will be disabled and the rest of this block will be ignored.
177          */
178         #defaultlevel = 5
179
180         /*
181          * The following 4 directives define what operations will take place when DefCon is set to levels
182          * 1 through 4. Each level is a list that must be separated by spaces.
183          *
184          * The following operations can be defined at each level:
185          * - nonewchannels: Disables registering new channels
186          * - nonewnicks: Disables registering new nicks
187          * - nomlockchanges: Disables changing MLOCK on registered channels
188          * - forcechanmodes: Forces all channels to have the modes given in the later chanmodes directive
189          * - reducedsessions: Reduces the session limit to the value given in the later sessionlimit directive
190          * - nonewclients: KILL any new clients trying to connect
191          * - operonly: Services will ignore all non-IRCops
192          * - silentoperonly: Services will silently ignore all non-IRCops
193          * - akillnewclients: AKILL any new clients trying to connect
194          * - nonewmemos: No new memos will be sent to block MemoServ attacks
195          */
196         level4 = "nonewchannels nonewnicks nomlockchanges reducedsessions"
197         level3 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions"
198         level2 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly"
199         level1 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly akillnewclients"
200
201         /*
202          * New session limit to use when a DefCon level is using "reduced" session limiting.
203          */
204         #sessionlimit = 2
205
206         /*
207          * Length of time to add an AKILL for when DefCon is preventing new clients from connecting to the
208          * network.
209          */
210         #akillexpire = 5m
211
212         /*
213          * The channel modes to set on all channels when the DefCon channel mode system is in use.
214          *
215          * Note 1: Choose these modes carefully, because when DefCon switches to a level which does NOT have
216          * the mode setting selected, Services will set the reverse on all channels, e.g. if this setting
217          * is +RN when DefCon is used, all channels will be set to +RN, when DefCon is removed, all
218          * channels will be set to -RN. You don't want to set this to +k for example, because when DefCon
219          * is removed, all channels are set -k, removing the key from previously keyed channels.
220          *
221          * Note 2: MLOCKed modes will not be lost.
222          */
223         #chanmodes = "+R"
224
225         /*
226          * This value can be used to automatically return the network to DefCon level 5 after the specified
227          * time period, just in case any IRC Operator forgets to remove a DefCon setting.
228          *
229          * This directive is optional.
230          */
231         #timeout = 15m
232
233         /*
234          * If set, Services will send a global message on DefCon level changes.
235          *
236          * This directive is optional.
237          */
238         #globalondefcon = yes
239
240         /*
241          * If set, Services will send the global message defined in the message directive on DefCon level
242          * changes.
243          *
244          * This directive is optional.
245          */
246         #globalondefconmore = yes
247
248         /*
249          * Defines the message that will be sent on DefCon level changes when globalondefconmore is set.
250          *
251          * This directive is required only when globalondefconmore is set.
252          */
253         #message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"
254
255         /*
256          * Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
257          * and will also override globalondefcon and globalondefconmore when set.
258          */
259         #offmessage = "Services are now back to normal, sorry for any inconvenience"
260
261         /*
262          * Defines the reason to use when clients are KILLed or AKILLed from the network while the proper
263          * DefCon operation is in effect.
264          */
265         #akillreason = "This network is currently not accepting connections, please try again later."
266 }
267 #command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon"; }
268
269 /*
270  * os_dns
271  *
272  * Provides the command operserv/dns.
273  *
274  * This module requires that m_dns is loaded.
275  *
276  * This module allows controlling a DNS zone. This is useful for
277  * controlling what servers users are placed on for load balancing,
278  * and to automatically remove split servers.
279  *
280  * To use this module you must set a nameserver record for services
281  * so that DNS queries go to services.
282  *
283  * Alternatively, you may use a slave DNS server to hide service's IP,
284  * provide query caching, and provide better fault tolerance.
285  *
286  * To do this using BIND, configure similar to:
287  *
288  * options { max-refresh-time 60; };
289  * zone "irc.example.com" IN {
290  *   type slave;
291  *   masters { 127.0.0.1 port 5353; };
292  * };
293  *
294  * Where 127.0.0.1:5353 is the IP and port services are listening on.
295  * We recommend you externally firewall both UDP and TCP to the port
296  * Anope is listening on.
297  *
298  * Finally set a NS record for irc.example.com. to BIND or services.
299  */
300 #module
301 {
302         name = "os_dns"
303
304         /* TTL for records. This should be very low if your records change often. */
305         ttl = 1m
306
307         /* If a server drops this many users the server is automatically removed from the DNS zone.
308          * This directive is optional.
309          */
310         user_drop_mark = 50
311
312         /* The time used for user_drop_mark. */
313         user_drop_time = 1m
314
315         /* When a server is removed from the zone for dropping users, it is readded after this time.
316          * This directive is optional.
317          */
318         user_drop_readd_time = 5m
319
320         /* If set, when a server splits, it is automatically removed from the zone. */
321         remove_split_servers = yes
322
323         /* If set, when a server connects to the network, it will be automatically added to
324          * the zone if it is a known server.
325          */
326         readd_connected_servers = no
327 }
328 #command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
329
330 /*
331  * os_config
332  *
333  * Provides the command operserv/config.
334  *
335  * Used to view and set configuration options while services are running.
336  */
337 module { name = "os_config" }
338 command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; permission = "operserv/config"; }
339
340 /*
341  * os_forbid
342  *
343  * Provides the command operserv/forbid.
344  *
345  * Used to forbid specific nicks, channels, emails, etc. from being used.
346  */
347 module { name = "os_forbid" }
348 command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid"; }
349
350 /*
351  * os_ignore
352  *
353  * Provides the command operserv/ignore.
354  *
355  * Used to make Services ignore users.
356  */
357 module { name = "os_ignore" }
358 command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore"; }
359
360 /*
361  * os_info
362  *
363  * Provides the command operserv/info.
364  *
365  * Used to add oper only notes to users and channels.
366  */
367 module { name = "os_info" }
368 command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info"; }
369
370 /*
371  * os_jupe
372  *
373  * Provides the command operserv/jupe.
374  *
375  * Used to disconnect servers from the network and prevent them from relinking.
376  */
377 module { name = "os_jupe" }
378 command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permission = "operserv/jupe"; }
379
380 /*
381  * os_kick
382  *
383  * Provides the command operserv/kick.
384  *
385  * Used to kick users from channels.
386  */
387 module { name = "os_kick" }
388 command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permission = "operserv/kick"; }
389
390 /*
391  * os_kill
392  *
393  * Provides the command operserv/kill.
394  *
395  * Used to forcibly disconnect users from the network.
396  */
397 module { name = "os_kill" }
398 command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill"; }
399
400 /*
401  * os_list
402  *
403  * Provides the commands operserv/chanlist and operserv/userlist.
404  *
405  * Used to list and search the channels and users currently on the network.
406  */
407 module { name = "os_list" }
408 command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist"; }
409 command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist"; }
410
411 /*
412  * os_login
413  *
414  * Provides the commands operserv/login and operserv/logout.
415  *
416  * Used to login to OperServ, only required if your oper block requires this.
417  */
418 module { name = "os_login" }
419 command { service = "OperServ"; name = "LOGIN"; command = "operserv/login"; }
420 command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
421
422 /*
423  * os_logsearch
424  *
425  * Provides the command operserv/logsearch.
426  *
427  * Used to search services log files.
428  */
429 module
430 {
431         name = "os_logsearch"
432
433         /* The log file name to search. There should be a log{} block configured to log
434          * to a file of this name.
435          */
436         logname = "services.log"
437 }
438 command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
439
440 /*
441  * os_mode
442  *
443  * Provides the commands operserv/mode and operserv/umode.
444  *
445  * Used to change user and channel modes.
446  */
447 module { name = "os_mode" }
448 command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode"; }
449 command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode"; }
450
451 /*
452  * os_modinfo
453  *
454  * Provides the commands operserv/modinfo and operserv/modlist.
455  *
456  * Used to show information about loaded modules.
457  */
458 module { name = "os_modinfo" }
459 command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo"; }
460 command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo"; }
461
462 /*
463  * os_module
464  *
465  * Provides the commands operserv/modload, operserv/modreload, and operserv/modunload.
466  *
467  * Used to load, reload, and unload modules.
468  */
469 module { name = "os_module" }
470 command { service = "OperServ"; name = "MODLOAD"; command = "operserv/modload"; permission = "operserv/modload"; }
471 command { service = "OperServ"; name = "MODRELOAD"; command = "operserv/modreload"; permission = "operserv/modload"; }
472 command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunload"; permission = "operserv/modload"; }
473
474 /*
475  * os_news
476  *
477  * Provides the commands operserv/logonnews, operserv/opernews, and operserv/randomnews.
478  *
479  * Used to configure news notices shown to users when they connect, and opers when they oper.
480  */
481 module
482 {
483         name = "os_news"
484
485         /*
486          * The service bot names to use to send news to users on connection
487          * and to opers when they oper.
488          */
489         announcer = "Global"
490         oper_announcer = "OperServ"
491
492         /*
493          * The number of LOGON/OPER news items to display when a user logs on.
494          *
495          * This directive is optional, if not set it will default to 3.
496          */
497         #newscount = 3
498 }
499 command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news"; }
500 command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news"; }
501 command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news"; }
502
503 /*
504  * os_noop
505  *
506  * Provides the command operserv/noop.
507  *
508  * Used to NOOP a server, which prevents users from opering on that server.
509  */
510 module { name = "os_noop" }
511 command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }
512
513 /*
514  * os_oline
515  *
516  * Provides the command operserv/oline.
517  *
518  * Used to set oper flags on users, and is specific to UnrealIRCd 3.2.
519  * See /helpop ?svso on your IRCd for more information.
520  */
521 #module { name = "os_oline" }
522 #command { service = "OperServ"; name = "OLINE"; command = "operserv/oline"; permission = "operserv/oline"; }
523
524 /*
525  * os_oper
526  *
527  * Provides the command operserv/oper.
528  *
529  * Used to configure opers and show information about opertypes.
530  */
531 module { name = "os_oper" }
532 command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper"; }
533
534 /*
535  * os_reload
536  *
537  * Provides the command operserv/reload.
538  *
539  * Used to reload the services.conf configuration file.
540  */
541 module { name = "os_reload" }
542 command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; permission = "operserv/reload"; }
543
544 /*
545  * os_session
546  *
547  * Provides the commands operserv/exception and operserv/session.
548  *
549  * This module enables session limiting. Session limiting prevents users from connecting more than a certain
550  * number of times from the same IP at the same time - thus preventing most types of cloning.
551  * Once a host reaches its session limit, all clients attempting to connect from that host will
552  * be killed. Exceptions to the default session limit can be defined via the exception list.
553  *
554  * Used to manage the session limit exception list, and view currently active sessions.
555  */
556 module
557 {
558         name = "os_session"
559
560         /*
561          * Default session limit per host. Once a host reaches its session limit, all clients attempting
562          * to connect from that host will be killed.
563          *
564          * This directive is required if os_session is loaded.
565          */
566         defaultsessionlimit = 5
567
568         /*
569          * The maximum session limit that may be set for a host in an exception.
570          *
571          * This directive is required if os_session is loaded.
572          */
573         maxsessionlimit = 100
574
575         /*
576          * Sets the default expiry time for session exceptions.
577          */
578         #exceptionexpiry = 1d
579
580         /*
581          * The message that will be NOTICE'd to a user just before they are removed from the network because
582          * their host's session limit has been exceeded. It may be used to give a slightly more descriptive
583          * reason for the impending kill as opposed to simply "Session limit exceeded".
584          *
585          * This directive is optional, if not set, nothing will be sent.
586          */
587         sessionlimitexceeded = "The session limit for your IP %IP% has been exceeded."
588
589         /*
590          * Same as above, but should be used to provide a website address where users can find out more
591          * about session limits and how to go about applying for an exception.
592          *
593          * Note: This directive has been intentionally commented out in an effort to remind you to change
594          * the URL it contains. It is recommended that you supply an address/URL where people can get help
595          * regarding session limits.
596          *
597          * This directive is optional, if not set, nothing will be sent.
598          */
599         #sessionlimitdetailsloc = "Please visit https://your.website.url/ for more information about session limits."
600
601         /*
602          * If set and is not 0, this directive tells Services to add an AKILL if the number of subsequent kills
603          * for the same host exceeds this value, preventing the network from experiencing KILL floods.
604          *
605          * This directive is optional.
606          */
607         maxsessionkill = 15
608
609         /*
610          * Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
611          *
612          * This directive is optional, if not set, defaults to 30 minutes.
613          */
614         sessionautokillexpiry = 30m
615
616         /*
617          * Sets the CIDR value used to determine which IP addresses represent the same person.
618          * By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
619          * If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
620          * 64 or 48.
621          */
622         session_ipv4_cidr = 32
623         session_ipv6_cidr = 128
624 }
625 command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
626 command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }
627
628 /*
629  * os_set
630  *
631  * Provides the command operserv/set.
632  *
633  * Used to set various settings such as superadmin, debug mode, etc.
634  */
635 module
636 {
637         name = "os_set"
638
639         /*
640          * If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
641          * them extra privileges such as being a founder on ALL channels.
642          *
643          * This directive is optional.
644          */
645         #superadmin = yes
646 }
647 command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
648
649 /*
650  * os_shutdown
651  *
652  * Provides the commands operserv/quit, operserv/restart, and operserv/shutdown.
653  *
654  * Used to quit, restart, or shutdown services.
655  */
656 module { name = "os_shutdown" }
657 command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit"; }
658 command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart"; }
659 command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown"; }
660
661 /*
662  * os_stats
663  *
664  * Provides the operserv/stats command.
665  *
666  * Used to show statistics about services.
667  */
668 module { name = "os_stats" }
669 command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats"; }
670
671 /*
672  * os_svs
673  *
674  * Provides the commands operserv/svsnick, operserv/svsjoin, and operserv/svspart.
675  *
676  * Used to force users to change nicks, join and part channels.
677  */
678 module { name = "os_svs" }
679 command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs"; }
680 command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs"; }
681 command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs"; }
682
683 /*
684  * os_sxline
685  *
686  * Provides the operserv/snline and operserv/sqline commands.
687  *
688  * Used to ban real names, nick names, and possibly channels.
689  */
690 module { name = "os_sxline" }
691 command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline"; }
692 command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; permission = "operserv/sqline"; }
693
694 /*
695  * os_update
696  *
697  * Provides the operserv/update command.
698  *
699  * Use to immediately update the databases.
700  */
701 module { name = "os_update" }
702 command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update"; }