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