summaryrefslogtreecommitdiff
path: root/data/stats.standalone.example.conf
blob: 4a1c6f6448c3c501ba9e494e1c375f840be1acf2 (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
/*
 * Example configuration file for Anope. After making the appropriate
 * changes to this file, place it in the Anope conf directory (as
 * specified in the "Config" script, default /home/username/anope/conf)
 * under the name "anope.conf".
 *
 * The format of this file is fairly simple: three types of comments are supported:
 *  - All text after a '#' on a line is ignored, as in shell scripting
 *  - All text after '//' on a line is ignored, as in C++
 *  - A block of text like this one is ignored, as in C
 *
 * Outside of comments, there are three structures: blocks, keys, and values.
 *
 * A block is a named container, which contains a number of key to value pairs
 * - you may think of this as an array.
 *
 * A block is created like so:
 * foobar
 * {
 *    moo = "cow"
 *    foo = bar
 * }
 *
 * Note that nameless blocks are allowed and are often used with comments to allow
 * easily commenting an entire block, for example:
 * #foobar
 * {
 *    moo = "cow"
 *    foo = bar
 * }
 * is an entirely commented block.
 *
 * Keys are case insensitive. Values depend on what key - generally, information is
 * given in the key comment. The quoting of values (and most other syntax) is quite
 * flexible, however, please do not forget to quote your strings:
 *
 *   "This is a parameter string with spaces in it"
 *
 * If you need to include a double quote inside a quoted string, precede it
 * by a backslash:
 *
 *   "This string has \"double quotes\" in it"
 *
 * Time parameters can be specified either as an integer representing a
 * number of seconds (e.g. "3600" = 1 hour), or as an integer with a unit
 * specifier: "s" = seconds, "m" = minutes, "h" = hours, "d" = days.
 * Combinations (such as "1h30m") are not permitted. Examples (all of which
 * represent the same length of time, one day):
 *
 *   "86400", "86400s", "1440m", "24h", "1d"
 *
 * In the documentation for each directive, one of the following will be
 * included to indicate whether an option is required:
 *
 * [REQUIRED]
 *     Indicates a directive which must be given. Without it, Anope will
 *     not start.
 *
 * [RECOMMENDED]
 *     Indicates a directive which may be omitted, but omitting it may cause
 *     undesirable side effects.
 *
 * [OPTIONAL]
 *     Indicates a directive which is optional. If not given, the feature
 *     will typically be disabled. If this is not the case, more
 *     information will be given in the documentation.
 *
 * [DISCOURAGED]
 *     Indicates a directive which may cause undesirable side effects if
 *     specified.
 *
 * [DEPRECATED]
 *     Indicates a directive which will disappear in a future version of
 *     Anope, usually because its functionality has been either
 *     superseded by that of other directives or incorporated into the main
 *     program.
 */

/*
 * [OPTIONAL] Defines
 *
 * You can define values to other values, which can be used to easily change
 * many values in the configuration at once.
 */

/*
 * The stats.host define is used in multiple different locations throughout the
 * configuration for the stats client hostname.
 */
define
{
	name = "stats.host"
	value = "stats.example.com"
}

/*
 * [OPTIONAL] Additional Includes
 *
 * You can include additional configuration files here.
 * You may also include executable files, which will be executed and
 * the output from it will be included into your configuration.
 */

#include
{
	type = "file"
	name = "some.conf"
}

#include
{
	type = "executable"
	name = "/usr/bin/wget -q -O - https://some.misconfigured.network.com/stats.conf"
}

/*
 * [REQUIRED] IRCd Config
 *
 * This section is used to set up Anope to connect to your IRC network.
 * This section can be included multiple times, and Anope will attempt to
 * connect to each server until it finally connects.
 *
 * Each uplink IRCd should have a corresponding configuration to allow Anope
 * to link to it.
 *
 * An example configuration for InspIRCd that is compatible with the below uplink
 * and serverinfo configuration would look like:
 *
 *     # This goes in inspircd.conf, *NOT* your Anope config!
 *     <link name="stats.example.com"
 *           ipaddr="127.0.0.1"
 *           port="7000"
 *           sendpass="mypassword"
 *           recvpass="mypassword">
 *     <uline server="stats.example.com" silent="yes">
 *     <bind address="127.0.0.1" port="7000" type="servers">
 *
 * An example configuration for UnrealIRCd that is compatible with the below uplink
 * and serverinfo configuration would look like:
 *
 *     // This goes in unrealircd.conf, *NOT* your Anope config!
 *     listen {
 *         ip 127.0.0.1;
 *         port 7000;
 *         options {
 *             serversonly;
 *         };
 *     };
 *     link stats.example.com {
 *         incoming {
 *             mask *@127.0.0.1;
 *         };
 *         password "mypassword";
 *         class servers;
 *     };
 *     ulines { stats.example.com; };
 */
uplink
{
	/*
	 * The IP address, hostname, or UNIX socket path of the IRC server you wish
	 * to connect Anope to.
	 * Usually, you will want to connect over 127.0.0.1 (aka localhost).
	 *
	 * NOTE: On some shell providers, this will not be an option.
	 */
	host = "127.0.0.1"

	/*
	 * The protocol that Anope should use when connecting to the uplink. Can
	 * be set to "ipv4" (the default), "ipv6", or "unix".
	 */
	protocol = "ipv4"

	/*
	 * Enable if Anope should connect using SSL.
	 * You must have an SSL module loaded for this to work.
	 */
	ssl = no

	/*
	 * The port to connect to.
	 * The IRCd *MUST* be configured to listen on this port, and to accept
	 * server connections.
	 *
	 * Refer to your IRCd documentation for how this is to be done.
	 */
	port = 7000

	/*
	 * The password to send to the IRC server for authentication.
	 * This must match the link block on your IRCd.
	 *
	 * Refer to your IRCd documentation for more information on link blocks.
	 */
	password = "mypassword"
}

/*
 * [REQUIRED] Server Information
 *
 * This section contains information about the services server.
 */
serverinfo
{
	/*
	 * The hostname that Anope will be seen as, it must have no conflicts with any
	 * other server names on the rest of your IRC network. Note that it does not have
	 * to be an existing hostname, just one that isn't on your network already.
	 */
	name = "stats.example.com"

	/*
	 * The text which should appear as the server's information in /WHOIS and similar
	 * queries.
	 */
	description = "Anope IRC Statistics"

	/*
	 * The local address that Anope will bind to before connecting to the remote
	 * server. This may be useful for multihomed hosts. If omitted, Anope will let
	 * the Operating System choose the local address. This directive is optional.
	 *
	 * If you don't know what this means or don't need to use it, just leave this
	 * directive commented out.
	 */
	#localhost = "nowhere."

	/*
	 * What Server ID to use for this connection?
	 * Note: This should *ONLY* be used for TS6/P10 IRCds. Refer to your IRCd documentation
	 * to see if this is needed.
	 */
	#id = "00A"

	/*
	 * The filename containing the Anope process ID. The path is relative to the
	 * data directory.
	 */
	pid = "anope.pid"

	/*
	 * The filename containing the Message of the Day. The path is relative to the
	 * config directory.
	 */
	motd = "motd.txt"
}

/*
 * [REQUIRED] Protocol module
 *
 * This directive tells Anope which IRCd Protocol to speak when connecting.
 * You MUST modify this to match the IRCd you run.
 *
 * Supported:
 *  - bahamut
 *  - hybrid
 *  - inspircd
 *  - ngircd
 *  - plexus
 *  - ratbox
 *  - solanum
 *  - unrealircd
 */
module
{
	name = "inspircd"
}

/*
 * [REQUIRED] Network Information
 *
 * This section contains information about the IRC network that Anope will be
 * connecting to.
 */
networkinfo
{
	/*
	 * This is the name of the network that Anope will be running on.
	 */
	networkname = "LocalNet"

	/*
	 * Set this to the maximum allowed nick length on your network.
	 * Be sure to set this correctly, as setting this wrong can result in
	 * Anope being disconnected from the network. Defaults to 31.
	 */
	#nicklen = 31

	/* Set this to the maximum allowed ident length on your network.
	 * Be sure to set this correctly, as setting this wrong can result in
	 * Anope being disconnected from the network. Defaults to 10.
	 */
	#userlen = 10

	/* Set this to the maximum allowed hostname length on your network.
	 * Be sure to set this correctly, as setting this wrong can result in
	 * Anope being disconnected from the network. Defaults to 64.
	 */
	#hostlen = 64

	/* Set this to the maximum allowed channel length on your network.
	 * Defaults to 64.
	 */
	#chanlen = 32

	/* The maximum number of list modes settable on a channel (such as b, e, I).
	 * Comment out or set to 0 to disable.
	 */
	modelistsize = 100

	/*
	 * The characters allowed in hostnames. This is used for validating hostnames given
	 * to services, such as BotServ bot hostnames and user vhosts. Changing this is not
	 * recommended unless you know for sure your IRCd supports whatever characters you are
	 * wanting to use. Telling services to set a vHost containing characters your IRCd
	 * disallows could potentially break the IRCd and/or Anope.
	 *
	 * It is recommended you DON'T change this.
	 */
	vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"

	/*
	 * If set to true, allows vHosts to not contain dots (.).
	 * Newer IRCds generally do not have a problem with this, but the same warning as
	 * vhost_chars applies.
	 *
	 * It is recommended you DON'T change this.
	 */
	allow_undotted_vhosts = false

	/*
	 * The characters that are not allowed to be at the very beginning or very ending
	 * of a vHost. The same warning as vhost_chars applies.
	 *
	 * It is recommended you DON'T change this.
	 */
	disallow_start_or_end = ".-"
}

/*
 * [REQUIRED] Anope Options
 *
 * This section contains various options which determine how Anope will operate.
 */
options
{
	/*
	 * On Linux/UNIX systems Anope can setuid and setgid to this user and group
	 * after starting up. This is useful if Anope has to bind to privileged ports.
	 */
	#user = "anope"
	#group = "anope"

	/*
	 * The case mapping used by services. This must be set to a valid locale name
	 * installed on your machine. Anope uses this case map to compare, with
	 * case insensitivity, things such as nick names, channel names, etc.
	 *
	 * We provide two special casemaps shipped with Anope, ascii and rfc1459.
	 *
	 * This value should be set to what your IRCd uses, which is probably rfc1459,
	 * however Anope has always used ascii for comparison, so the default is ascii.
	 *
	 * Changing this value once set is not recommended.
	 */
	casemap = "ascii"

	/*
	 * Sets the timeout period for reading from the uplink.
	 */
	readtimeout = 5s

	/*
	 * Sets the interval between sending warning messages for program errors via
	 * WALLOPS/GLOBOPS.
	 */
	warningtimeout = 4h

	/*
	 * If set, Anope will only show /stats o to IRC Operators. This directive
	 * is optional.
	 */
	#hidestatso = yes

	/*
	 * A space-separated list of U-lined servers on your network, it is assumed that
	 * the servers in this list are allowed to set channel modes and Anope will
	 * not attempt to reverse their mode changes.
	 *
	 * WARNING: Do NOT put your normal IRC user servers in this directive.
	 *
	 * This directive is optional.
	 */
	#ulineservers = "services.your.network"

	/*
	 * How long to wait between connection retries with the uplink(s).
	 */
	retrywait = 60s
}

/*
 * [RECOMMENDED] Logging Configuration
 *
 * This section is used for configuring what is logged and where it is logged to.
 * You may have multiple log blocks if you wish. Remember to properly secure any
 * channels you choose to have Anope log to!
 */
log
{
	/*
	 * Target(s) to log to, which may be one of the following:
	 *   - a channel name
	 *   - a filename
	 *   - globops
	 */
	target = "stats.log"

	/* Log to both stats.log and the channel #stats
	 *
	 * Note that some older IRCds, such as Ratbox, require services to be in the
	 * log channel to be able to message it. To do this, configure service:channels to
	 * join your logging channel.
	 */
	#target = "stats.log #stats"

	/*
	 * The source(s) to only accept log messages from. Leave commented to allow all sources.
	 * This can be a users name, a channel name, one of our clients (e.g. OperServ), or a server name.
	 */
	#source = ""

	/*
	 * The bot used to log generic messages which have no predefined sender if there
	 * is a channel in the target directive.
	 */
	bot = "Global"

	/*
	 * The number of days to keep log files, only useful if you are logging to a file.
	 * Set to 0 to never delete old log files.
	 *
	 * Note that Anope must run 24 hours a day for this feature to work correctly.
	 */
	logage = 7

	/*
	 * What types of log messages should be logged by this block. There are nine general categories:
	 *
	 *  servers    - Server actions, linking, squitting, etc.
	 *  channels   - Actions in channels such as joins, parts, kicks, etc.
	 *  users      - User actions such as connecting, disconnecting, changing name, etc.
	 *  other      - All other messages without a category.
	 *  rawio      - Logs raw input and output from services
	 *  debug      - Debug messages (log files can become VERY large from this).
	 *
	 * These options determine what messages from the categories should be logged. Wildcards are accepted, and
	 * you can also negate values with a ~. For example, "~operserv/akill operserv/*" would log all operserv
	 * messages except for operserv/akill. Note that processing stops at the first matching option, which
	 * means "* ~operserv/*" would log everything because * matches everything.
	 *
	 * Valid server options are:
	 *    connect, quit, sync, squit
	 *
	 * Valid channel options are:
	 *    create, destroy, join, part, kick, leave, mode
	 *
	 * Valid user options are:
	 *    connect, disconnect, quit, nick, ident, host, mode, maxusers, oper, away
	 *
	 * Rawio and debug are simple yes/no answers, there are no types for them.
	 *
	 * Note that modules may add their own values to these options.
	 */
	servers = "*"
	#channels = "~mode *"
	users = "connect disconnect nick"
	other = "*"
	rawio = no
	debug = no
}

/*
 * [REQUIRED] MySQL Database configuration.
 *
 * mysql
 *
 * This module allows other modules to use MySQL.
 */
module
{
	name = "mysql"

	mysql
	{
		/* The name of this service. */
		name = "mysql/main"
		database = "anope"
		server = "127.0.0.1"
		username = "anope"
		password = "mypassword"
		port = 3306
	}
}

/*
 * IRC2SQL Gateway
 * This module collects data about users, channels and servers. It doesn't build stats
 * itself, however, it gives you the database, it's up to you how you use it.
 *
 * Requires a MySQL Database and MySQL version 5.5 or higher
 */
include
{
	type = "file"
	name = "irc2sql.example.conf"
}