summaryrefslogtreecommitdiff
path: root/data/operserv.example.conf
blob: 77c96930945d1b53832a4bd7b3e7949047bfe473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
/*
 * Example configuration file for OperServ.
 */

/*
 * First, create the service.
 */
service
{
	/*
	 * The name of the OperServ client.
	 * If you change this value, you probably want to change the client directive in the configuration for the operserv module too.
	 */
	nick = "OperServ"

	/*
	 * The username of the OperServ client.
	 */
	user = "services"

	/*
	 * The hostname of the OperServ client.
	 */
	host = "services.host"

	/*
	 * The realname of the OperServ client.
	 */
	gecos = "Operator Service"

	/*
	 * The modes this client should use.
	 * Do not modify this unless you know what you are doing.
	 *
	 * These modes are very IRCd specific. If left commented, sane defaults
	 * are used based on what protocol module you have loaded.
	 *
	 * Note that setting this option incorrectly could potentially BREAK some, if
	 * not all, usefulness of the client. We will not support you if this client is
	 * unable to do certain things if this option is enabled.
	 */
	#modes = "+o"

	/*
	 * An optional comma separated list of channels this service should join. Outside
	 * of log channels this is not very useful, as the service will just idle in the
	 * specified channels, and will not accept any types of commands.
	 *
	 * Prefixes may be given to the channels in the form of mode characters or prefix symbols.
	 */
	#channels = "@#services,#mychan"
}

/*
 * Core OperServ module.
 *
 * Provides essential functionality for OperServ.
 */
module
{
	name = "operserv"

	/*
	 * The name of the client that should be OperServ.
	 */
	client = "OperServ"

	/*
	 * These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
	 * and SQLINEs.
	 */
	autokillexpiry = 30d
	chankillexpiry = 30d
	snlineexpiry = 30d
	sqlineexpiry = 30d

	/*
	 * If set, this option will make Anope send an AKILL command immediately after it has been
	 * added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
	 * been added.
	 *
	 * This directive is optional, but recommended.
	 */
	akillonadd = yes

	/*
	 * If set, this option will make Anope send an (SVS)KILL command immediately after SNLINE ADD.
	 * This eliminates the need for killing the user after the SNLINE has been added.
	 *
	 * This directive is optional.
	 */
	killonsnline = yes

	/*
	 * If set, this option will make Anope send an (SVS)KILL command immediately after SQLINE ADD.
	 * This eliminates the need for killing the user after the SQLINE has been added.
	 *
	 * This directive is optional.
	 */
	killonsqline = yes

	/*
	 * Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
	 *
	 * This directive is optional.
	 */
	addakiller = yes

	/*
	 * Adds akill IDs to akills. Akill IDs are given to users in their ban reason and can be used to easily view,
	 * modify, or remove an akill from the ID.
	 */
	akillids = yes

	/*
	 * If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
	 *
	 * This directive is optional, but recommended.
	 */
	opersonly = yes
}

/*
 * Core OperServ commands.
 *
 * In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
 * are loaded you can then configure the commands to be added to any client you like with any name you like.
 *
 * Additionally, you may provide a permission name that must be in the opertype of users executing the command.
 *
 * Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
 */

/* Give it a help command. */
command { service = "OperServ"; name = "HELP"; command = "generic/help"; }

/*
 * os_akill
 *
 * Provides the command operserv/akill.
 *
 * Used to ban users from the network.
 */
module { name = "os_akill" }
command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; permission = "operserv/akill"; }

/*
 * os_chankill
 *
 * Provides the command operserv/chankill.
 *
 * Used to akill users from an entire channel.
 */
module { name = "os_chankill" }
command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"; permission = "operserv/chankill"; }

/*
 * os_defcon
 *
 * Provides the command operserv/defcon.
 *
 * Allows you to set services in DefCon mode, which can be used to restrict services access
 * during bot attacks.
 */
#module
{
	name = "os_defcon"

	/*
	 * Default DefCon level (1-5) to use when starting Anope up. Level 5 constitutes normal operation
	 * while level 1 constitutes the most restrictive operation. If this setting is left out or set to
	 * 0, DefCon will be disabled and the rest of this block will be ignored.
	 */
	#defaultlevel = 5

	/*
	 * The following 4 directives define what operations will take place when DefCon is set to levels
	 * 1 through 4. Each level is a list that must be separated by spaces.
	 *
	 * The following operations can be defined at each level:
	 * - nonewchannels: Disables registering new channels
	 * - nonewnicks: Disables registering new nicks
	 * - nomlockchanges: Disables changing MLOCK on registered channels
	 * - forcechanmodes: Forces all channels to have the modes given in the later chanmodes directive
	 * - reducedsessions: Reduces the session limit to the value given in the later sessionlimit directive
	 * - nonewclients: KILL any new clients trying to connect
	 * - operonly: Ignore all non-IRCops
	 * - silentoperonly: Silently ignore all non-IRCops
	 * - akillnewclients: AKILL any new clients trying to connect
	 * - nonewmemos: No new memos will be sent to block MemoServ attacks
	 */
	level4 = "nonewchannels nonewnicks nomlockchanges reducedsessions"
	level3 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions"
	level2 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly"
	level1 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly akillnewclients"

	/*
	 * New session limit to use when a DefCon level is using "reduced" session limiting.
	 */
	#sessionlimit = 2

	/*
	 * Length of time to add an AKILL for when DefCon is preventing new clients from connecting to the
	 * network.
	 */
	#akillexpire = 5m

	/*
	 * The channel modes to set on all channels when the DefCon channel mode system is in use.
	 *
	 * Note 1: Choose these modes carefully, because when DefCon switches to a level which does NOT have
	 * the mode setting selected, Anope will set the reverse on all channels, e.g. if this setting
	 * is +RN when DefCon is used, all channels will be set to +RN, when DefCon is removed, all
	 * channels will be set to -RN. You don't want to set this to +k for example, because when DefCon
	 * is removed, all channels are set -k, removing the key from previously keyed channels.
	 *
	 * Note 2: MLOCKed modes will not be lost.
	 */
	#chanmodes = "+R"

	/*
	 * This value can be used to automatically return the network to DefCon level 5 after the specified
	 * time period, just in case any IRC Operator forgets to remove a DefCon setting.
	 *
	 * This directive is optional.
	 */
	#timeout = 15m

	/*
	 * If set, Anope will send a global message on DefCon level changes.
	 *
	 * This directive is optional.
	 */
	#globalondefcon = yes

	/*
	 * If set, Anope will send the global message defined in the message directive on DefCon level
	 * changes.
	 *
	 * This directive is optional.
	 */
	#globalondefconmore = yes

	/*
	 * Defines the message that will be sent on DefCon level changes when globalondefconmore is set.
	 *
	 * This directive is required only when globalondefconmore is set.
	 */
	#message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"

	/*
	 * Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
	 * and will also override globalondefcon and globalondefconmore when set.
	 */
	#offmessage = "Services are now back to normal, sorry for any inconvenience"

	/*
	 * Defines the reason to use when clients are KILLed or AKILLed from the network while the proper
	 * DefCon operation is in effect.
	 */
	#akillreason = "This network is currently not accepting connections, please try again later."
}
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon"; }

/*
 * os_dns
 *
 * Provides the command operserv/dns.
 *
 * This module requires that dns is loaded.
 *
 * This module allows controlling a DNS zone. This is useful for
 * controlling what servers users are placed on for load balancing,
 * and to automatically remove split servers.
 *
 * To use this module you must set a nameserver record for services
 * so that DNS queries go to services.
 *
 * Alternatively, you may use a slave DNS server to hide service's IP,
 * provide query caching, and provide better fault tolerance.
 *
 * To do this using BIND, configure similar to:
 *
 * options { max-refresh-time 60; };
 * zone "irc.example.com" IN {
 *   type slave;
 *   masters { 127.0.0.1 port 5353; };
 * };
 *
 * Where 127.0.0.1:5353 is the IP and port services are listening on.
 * We recommend you externally firewall both UDP and TCP to the port
 * Anope is listening on.
 *
 * Finally set a NS record for irc.example.com. to BIND or services.
 */
#module
{
	name = "os_dns"

	/* TTL for records. This should be very low if your records change often. */
	ttl = 1m

	/* If a server drops this many users the server is automatically removed from the DNS zone.
	 * This directive is optional.
	 */
	user_drop_mark = 50

	/* The time used for user_drop_mark. */
	user_drop_time = 1m

	/* When a server is removed from the zone for dropping users, it is readded after this time.
	 * This directive is optional.
	 */
	user_drop_readd_time = 5m

	/* If set, when a server splits, it is automatically removed from the zone. */
	remove_split_servers = yes

	/* If set, when a server connects to the network, it will be automatically added to
	 * the zone if it is a known server.
	 */
	readd_connected_servers = no
}
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }

/*
 * os_config
 *
 * Provides the command operserv/config.
 *
 * Used to view and set configuration options while services are running.
 */
module { name = "os_config" }
command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; permission = "operserv/config"; }

/*
 * os_forbid
 *
 * Provides the command operserv/forbid.
 *
 * Used to forbid specific nicks, channels, emails, etc. from being used.
 */
module { name = "os_forbid" }
command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid"; }

/*
 * os_ignore
 *
 * Provides the command operserv/ignore.
 *
 * Used to make Anope ignore users.
 */
module { name = "os_ignore" }
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore"; }

/*
 * os_info
 *
 * Provides the command operserv/info.
 *
 * Used to add oper only notes to users and channels.
 */
module { name = "os_info" }
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info"; }

/*
 * os_jupe
 *
 * Provides the command operserv/jupe.
 *
 * Used to disconnect servers from the network and prevent them from relinking.
 */
module { name = "os_jupe" }
command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permission = "operserv/jupe"; }

/*
 * os_kick
 *
 * Provides the command operserv/kick.
 *
 * Used to kick users from channels.
 */
module { name = "os_kick" }
command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permission = "operserv/kick"; }

/*
 * os_kill
 *
 * Provides the command operserv/kill.
 *
 * Used to forcibly disconnect users from the network.
 */
module { name = "os_kill" }
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill"; }

/*
 * os_list
 *
 * Provides the commands operserv/chanlist and operserv/userlist.
 *
 * Used to list and search the channels and users currently on the network.
 */
module { name = "os_list" }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist"; }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist"; }

/*
 * os_login
 *
 * Provides the commands operserv/login and operserv/logout.
 *
 * Used to login to OperServ, only required if your oper block requires this.
 */
module { name = "os_login" }
command { service = "OperServ"; name = "LOGIN"; command = "operserv/login"; }
command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }

/*
 * os_logsearch
 *
 * Provides the command operserv/logsearch.
 *
 * Used to search services log files.
 */
module
{
	name = "os_logsearch"

	/* The log file name to search. There should be a log{} block configured to log
	 * to a file of this name.
	 */
	logname = "services.log"
}
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }

/*
 * os_mode
 *
 * Provides the commands operserv/mode and operserv/umode.
 *
 * Used to change user and channel modes.
 */
module { name = "os_mode" }
command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode"; }
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode"; }

/*
 * os_modinfo
 *
 * Provides the commands operserv/modinfo and operserv/modlist.
 *
 * Used to show information about loaded modules.
 */
module { name = "os_modinfo" }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo"; }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo"; }

/*
 * os_module
 *
 * Provides the commands operserv/modload, operserv/modreload, and operserv/modunload.
 *
 * Used to load, reload, and unload modules.
 */
module { name = "os_module" }
command { service = "OperServ"; name = "MODLOAD"; command = "operserv/modload"; permission = "operserv/modload"; }
command { service = "OperServ"; name = "MODRELOAD"; command = "operserv/modreload"; permission = "operserv/modload"; }
command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunload"; permission = "operserv/modload"; }

/*
 * os_news
 *
 * Provides the commands operserv/logonnews, operserv/opernews, and operserv/randomnews.
 *
 * Used to configure news notices shown to users when they connect, and opers when they oper.
 */
module
{
	name = "os_news"

	/*
	 * The service bot names to use to send news to users on connection
	 * and to opers when they oper.
	 */
	announcer = "Global"
	oper_announcer = "OperServ"

	/*
	 * The number of LOGON/OPER news items to display when a user logs on.
	 *
	 * This directive is optional, if not set it will default to 3.
	 */
	#newscount = 3
}
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news"; }

/*
 * os_noop
 *
 * Provides the command operserv/noop.
 *
 * Used to NOOP a server, which prevents users from opering on that server.
 */
#module { name = "os_noop" }
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }

/*
 * os_oper
 *
 * Provides the command operserv/oper.
 *
 * Used to configure opers and show information about opertypes.
 */
module { name = "os_oper" }
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper"; }

/*
 * os_reload
 *
 * Provides the command operserv/reload.
 *
 * Used to reload the anope.conf configuration file.
 */
module { name = "os_reload" }
command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; permission = "operserv/reload"; }

/*
 * os_session
 *
 * Provides the commands operserv/exception and operserv/session.
 *
 * This module enables session limiting. Session limiting prevents users from connecting more than a certain
 * number of times from the same IP at the same time - thus preventing most types of cloning.
 * Once a host reaches its session limit, all clients attempting to connect from that host will
 * be killed. Exceptions to the default session limit can be defined via the exception list.
 *
 * Used to manage the session limit exception list, and view currently active sessions.
 */
module
{
	name = "os_session"

	/*
	 * Default session limit per host. Once a host reaches its session limit, all clients attempting
	 * to connect from that host will be killed.
	 *
	 * This directive is required if os_session is loaded.
	 */
	defaultsessionlimit = 5

	/*
	 * The maximum session limit that may be set for a host in an exception.
	 *
	 * This directive is required if os_session is loaded.
	 */
	maxsessionlimit = 100

	/*
	 * Sets the default expiry time for session exceptions.
	 */
	#exceptionexpiry = 1d

	/*
	 * The message that will be NOTICE'd to a user just before they are removed from the network because
	 * their host's session limit has been exceeded. It may be used to give a slightly more descriptive
	 * reason for the impending kill as opposed to simply "Session limit exceeded".
	 *
	 * This directive is optional, if not set, nothing will be sent.
	 */
	sessionlimitexceeded = "The session limit for your IP %IP% has been exceeded."

	/*
	 * Same as above, but should be used to provide a website address where users can find out more
	 * about session limits and how to go about applying for an exception.
	 *
	 * Note: This directive has been intentionally commented out in an effort to remind you to change
	 * the URL it contains. It is recommended that you supply an address/URL where people can get help
	 * regarding session limits.
	 *
	 * This directive is optional, if not set, nothing will be sent.
	 */
	#sessionlimitdetailsloc = "Please visit https://your.website.url/ for more information about session limits."

	/*
	 * If set and is not 0, this directive tells Anope to add an AKILL if the number of subsequent kills
	 * for the same host exceeds this value, preventing the network from experiencing KILL floods.
	 *
	 * This directive is optional.
	 */
	maxsessionkill = 15

	/*
	 * Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
	 *
	 * This directive is optional, if not set, defaults to 30 minutes.
	 */
	sessionautokillexpiry = 30m

	/*
	 * Sets the CIDR value used to determine which IP addresses represent the same person.
	 * By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
	 * If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
	 * 64 or 48.
	 */
	session_ipv4_cidr = 32
	session_ipv6_cidr = 128
}
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }

/*
 * os_set
 *
 * Provides the command operserv/set.
 *
 * Used to set various settings such as superadmin, debug mode, etc.
 */
module
{
	name = "os_set"

	/*
	 * If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
	 * them extra privileges such as being a founder on ALL channels.
	 *
	 * This directive is optional.
	 */
	#superadmin = yes
}
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }

/*
 * os_shutdown
 *
 * Provides the commands operserv/quit, operserv/restart, and operserv/shutdown.
 *
 * Used to quit, restart, or shutdown services.
 */
module { name = "os_shutdown" }
command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit"; }
command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart"; }
command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown"; }

/*
 * os_stats
 *
 * Provides the operserv/stats command.
 *
 * Used to show statistics about services.
 */
module { name = "os_stats" }
command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats"; }

/*
 * os_svs
 *
 * Provides the commands operserv/svsnick, operserv/svsjoin, and operserv/svspart.
 *
 * Used to force users to change nicks, join and part channels.
 */
module { name = "os_svs" }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs"; }

/*
 * os_sxline
 *
 * Provides the operserv/snline and operserv/sqline commands.
 *
 * Used to ban real names, nick names, and possibly channels.
 */
module { name = "os_sxline" }
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline"; }
command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; permission = "operserv/sqline"; }

/*
 * os_update
 *
 * Provides the operserv/update command.
 *
 * Use to immediately update the databases.
 */
module { name = "os_update" }
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update"; }