File: config.h.in

package info (click to toggle)
hybserv 1.9.2-4.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,852 kB
  • ctags: 1,854
  • sloc: ansic: 37,037; sh: 3,178; makefile: 337
file content (583 lines) | stat: -rw-r--r-- 18,601 bytes parent folder | download | duplicates (4)
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
/*
 * config.h
 * Hybserv2 Services by Hybserv2 team
 *
 * $Id: config.h.in 1411 2006-03-05 22:39:24Z kreator $
 */

#ifndef INCLUDED_config_h
#define INCLUDED_config_h

/* ------------------- Start of configurable section ------------ */

/*
 * This will automagically transform into correct SETPATH. Don't change
 * it.
 */
#define   SETPATH   "@prefix@/hybserv/settings.conf"

/*
 * Define this to enable NickServ (Nickname Services)
 */
#define   NICKSERVICES

/*
 * Define this to enable ChanServ (Channel Services)
 * NOTE: ChanServ requires NICKSERVICES, so if NickServ is disabled,
 *       ChanServ will be disabled as well (NickServ can function
 *       perfectly without ChanServ however)
 * At this moment we require CHANNELSERVICES too.
 */
#define   CHANNELSERVICES

/*
 * Define this to enable MemoServ (Memo Services)
 * NOTE: MemoServ requires NICKSERVICES, so if NickServ is disabled,
 *       MemoServ will be disabled as well (NickServ can function
 *       perfectly without MemoServ however)
 */
#define   MEMOSERVICES

/*
 * Define this to enable StatServ (Statistic Services)
 * NOTE: StatServ requires NICKSERVICES, so if NickServ is disabled,
 *       StatServ will be disabled as well (NickServ can function
 *       perfectly without StatServ however)
 */
#define   STATSERVICES

/*
 * Define this to enable HelpServ (Help Services)
 */
#define   HELPSERVICES

/*
 * Define this to enable Global (Global Services)
 */
#define   GLOBALSERVICES

/*
 * Define this to enable SeenServ (Seen Services)
 */
#define   SEENSERVICES

/*
 * Define this to enable public commands:
 * - !seen <mask> / !seennick <nick>
 * - !op [nick] / !deop [nick]
 */
#define PUBCOMMANDS

/*
 * If EMPOWERADMINS is defined, admins will be able to use SETPASS,
 * FORBID, DROP etc.
 */
#define   EMPOWERADMINS

/*
 * If EMPOWERADMINS_MORE is defined, administrators will have founder
 * access for any channel, thus being able to modify the access lists,
 * change channel SETs etc.  This allows administrators TOTAL access to
 * ANY channel, so you may want to undef it.
 */
#define   EMPOWERADMINS_MORE

/*
 * << STRONGLY RECOMMENDED >> Define this to allow users to link their
 * nickname to another, thus being able to use multiple nicknames, without
 * having configure each one. All nicknames in the same link will share a
 * common access list, memos, and set options. Also, if a nickname has
 * access to a certain channel, all nicknames in it's link list will have
 * the same access.  Furthermore, when a nickname identifies, he/she will
 * be identified for every nickname in their link.
 */
#define   LINKED_NICKNAMES

/*
 * << STRONGLY RECOMMENDED >> If OPERNICKIDENT is defined, opers
 * IDENTIFYing to OperServ will be required to IDENTIFY to NickServ first.
 * As the two passwords should *always* be different, this adds another
 * layer of security.
 */
#define   OPERNICKIDENT

/*
 * If IDENTIFOPER is defined, opers IDENTIFYing to OperServ will be
 * required to become first server operators (and SET NOEXPIRE) or else
 * they wont be able to identify even if their password and nick/hostname
 * are correct.(Security reasons). You also must define OPERNICKIDENT for
 * this to work -ddb
 */
#undef   IDENTIFOPER

/*
 * Define this if you want NickServ to record the TS of users who split so
 * that when they rejoin they don't need to re-IDENTIFY if their TS
 * matches. Also, OperServ will record the TS of users who have identified
 * so they don't need to do it over again. TS for split users is expired 
 * after half an hour.
 */
#define   RECORD_SPLIT_TS

/*
 * Define this to save the TS of users when they identify to NickServ. If 
 * services are restarted this can be used to see if they identified 
 * before the shutdown, so that they don't need to re-IDENTIFY.
 * As a precuation this will only work for a short while after a SJOIN 
 * (the ConnectBurst setting).
 */
#define   RECORD_RESTART_TS

/*
 * Define this ONLY if every server on your network is running some form
 * of hybrid ircd. The advantage of this feature is ChanServ will not have
 * to sit in every registered channel, since hybrid allows ChanServ to set
 * modes without having to be in the channel. CSr servers do not allow
 * this, so make sure NO servers on your network are running CSr.
 */
#define   HYBRID_ONLY

/* 
 * Define this if you plan to use services on Hybrid7 server. It will make
 * Hybserv use Hybrid7 features like glines/klines, etc.  This includes
 * +h and +I support, as well as some other stuff available through
 * #define HYBRID7_*..
 * (this will go into ./configure script)
 */
#define    HYBRID7

/*
 * Define this if you want DANCER ircd compatibility. It has +c and
 * +f modes for channels, as well as +e umode for users.
 * (this will go into ./configure script)
 */
#undef    DANCER

/*
 * If this is defined, commands that involve Hybserv setting modes, such
 * as .secure and .omode, will not break channel TS.  Instead, the program
 * will have OPERSERV_NICK join the channel to set the modes instead of
 * having the actual server set the modes.  A significant problem with
 * this, is if OPERSERV_NICK gets kicked before it has a chance to
 * complete its job, where if the server set the modes, that is not a
 * concern.  Thus, there's a tradeoff between efficiency and saving TS.
 */
#define   SAVE_TS

/* Define this if you want to use OPERWALL instead of WALLOPS for
 * system-wide messages. Enabled by default.
 */

#define   OPERWALL

/*
 * Define this to allocate memory for clients/channels/servers in large
 * chunks rather than doing it individually
 * Advantages:
 *   CPU load will be minimized during netsplits/netjoins because instead
 *   of malloc()/free()'ing every client or channel, we will already have
 *   the space allocated ahead of time
 * Disadvantages:
 *    Slightly more memory is used if a portion of the heap is unused.
 *
 * Undefining this can be very dangerous, since bound checking is not
 * performed on new clients' usernames and hostnames. It relies on ircd to
 * make sure the client has a valid hostname. Thus, it is much much safer
 * to leave this defined.
 */
#define   BLOCK_ALLOCATION

/*
 * Set this to the number of client structures to allocate at one time -
 * on really small nets, you may want to make this even lower
 */
#define   CLIENT_ALLOCATE   256

/*
 * Set this to the number of channel structures to allocate at one time
 */
#define   CHANNEL_ALLOCATE    256

/*
 * Set this to the number of server structures to allocate at one time
 */
#define   SERVER_ALLOCATE   5

/*
 * Define this to switch to high-traffic mode if the traffic load exceeds
 * RECVLOAD (defined below). Once in high-traffic mode, the hub server
 * will be given priority over all other dcc/telnet clients etc.
 */
#define   HIGHTRAFFIC_MODE

/*
 * Set this to the minimum number of Kilobytes/second we need from our hub
 * to switch to high-traffic mode.
 */
#define   RECVLOAD    25

/*
 * Set this to the number of seconds to stay in high-traffic mode once
 * activated.  If, at the end of HTM_TIMEOUT seconds, the traffic load is
 * still greater than RECVLOAD, high-traffic mode will continue for
 * another HTM_TIMEOUT seconds.
 */
#define   HTM_TIMEOUT   30

/*
 * Set this to the time interval (in seconds) to measure bytes received,
 * in order to calculate if high-traffic mode should be activated.  If the
 * current bytes received minus the bytes received HTM_INTERVAL seconds
 * ago exceeds RECVLOAD K/s, high-traffic mode will be activated The lower
 * this is, the more accurate it can detect the current load.
 *
 * I've noticed that this can cause services to drop into HTM mode on the
 * very beginning. In fact, it seems that on large networks where some
 * users have scripted IDENTIFY-ing it can cause almost immediate HTM
 * switching. So let it be 10 secs by default.
 */
#define   HTM_INTERVAL 5

/*
 * Set this to how many times we read the hub server's file descriptor in
 * ratio to other descriptors while in HTM.  For example, if HTM_RATIO is
 * 3, the hub's fd will be read in a ratio of 3:1 to other fds
 * (dcc/telnet/tcms etc)
 */
#define   HTM_RATIO   3

/*
 * << STRONGLY RECOMMENDED >> Define this to use encrypted
 * nickname/channel passwords for your databases
 * NOTE: If you change from using encryption to not using it, or vice
 *       versa, your database files will not work (you'll have to create
 *       new ones)
 */
#define   CRYPT_PASSWORDS

/*
 * << STRONGLY RECOMMENDED >> Define this to use encrypted passwords in O:
 * lines in hybserv.conf
 */
#define   CRYPT_OPER_PASSWORDS

/*
 * Define this if you are paranoid and want every cleartext password to be
 * manually erased from memory before free()-ing. This could affect
 * performance a bit, so it is undefined by default.
 */
#undef    BORKPASSWD

/* Define this if you wish to allow admins to use the .die command */
#define   ALLOW_DIE

/* 
 * Define these if you wish to enable glines and/or jupes 
 * NOTE: In order for ALLOW_JUPES to work correctly, you must give
 *       services an H: line in ircd.conf because it must create a fake
 *       server to take the place of the juped one
 */
#define   ALLOW_GLINES
#define   ALLOW_JUPES

/*
 * Define this if you want services to create 3 pseudo operators and
 * servers to vote for the gline. This is the ircd-hybrid gline
 * implementation, so it will not work on other ircds.
 * NOTE: These are Hybrid5/6 only glines.
 */
#define   HYBRID_GLINES

/*
 * Define this if you want services to create a gline the Hybrid7 way by
 * sending a mass-kline to all servers. This will ONLY work on hyb7, and
 * for it to work, every server must have a shared block as previously
 * described.
 */
#define   HYBRID7_UNKLINE

/*
 * Define this if you want services to be able to remove glines after a
 * specified period of time. This will ONLY work on hyb7, and for it to
 * work, every server must have a shared block and loaded m_unkline.so
 * which is provided in contrib/ directory as follows if your services
 * were named services.eu
 * 
 * shared {
 *     name="services.eu";
 * };
 */
#define   HYBRID7_GLINES

/*
 * Define this if you want halfops (+h) support for Hybrid7. Generally
 * this depends if halfop support is enabled in Hybrid7 IRC daemon
 * (compiled with --enable-halfops); by default it is enabled if you're
 * using Hybrid7.
 */
#define   HYBRID7_HALFOPS

/*
 * Define this if you don't like the idea of one person being able to jupe
 * servers.  If you don't want it, #undef JUPEVOTES.  If you do want it
 * #define JUPEVOTES <how many votes required> (usually 3).
 */
#undef    JUPEVOTES

/*
 * Define these to the username and the hostname that you want juped
 * nicks to be introduced with.  This may be extended later to just be
 * the defaults, and be able to specify the user@host on the .jupe line.
 */
#define   JUPED_USERNAME "juped"
#define   JUPED_HOSTNAME "juped.com"

/*
 * Define these if you wish to have the .killchan and .killhost commands
 * available
 */
#define   ALLOW_KILLCHAN
#define   ALLOW_KILLHOST

/*
 * Define this if you wish to allow administrators the use of the "dump"
 * command for raw IRC messages (inter-server).
 * BIG FAT WARNING: This stuff is serious. It can core your ircd, cause
 *                  desync, etc. This is not to be used in any kind of
 *                  "normal" IRC network.
 */
#undef    ALLOW_DUMP

/* 
 * Define this for debugging purposes. It will setup coresize
 * appropriately, and startup daemon in console mode for easier debugging.
 * Also, you might want to enable GDB_DEBUG to have Hybserv wait for Gdb
 * to attach it - and then you can set GDBAttached=1 to have it continue.
 */
#undef    DEBUGMODE
#undef    GDB_DEBUG

/*
 * Use this option wisely, as last resort. It will dump very large amounts
 * of debug information, causing actual daemon to lag.
 */
#undef    EXTREMEDEBUG

/*
 * This is feature that should give some information on netsplits - what
 * servers are split, for how long, etc.
 * Extra - sends notices to all +l operators about netsplits.
 */
#define   SPLIT_INFO
#define   EXTRA_SPLIT_INFO

/* 
 * Using this and M: lines can make your Hybserv send CONNECT commands
 * when split time expires for leaf/hub in M: line.
 */
#undef   AUTO_ROUTING


/*
 * Defining this will produce "Active operators .." output in VERSION
 * reply of any of the services. This could be a little performance hit on
 * large O line configuration files..
 */
#define   ADMININFO

/*
 * Turn this on to support gecos bans for Hybrid5/6.
 * NOTE: This _has_ to be turned off for Hybrid7, since it does not
 *       support +d style modes.
 */
#define   GECOSBANS

/*
 * Defining ADVFLOOD enables advanced flood protection. Every client
 * connect or nick change is stored in a table of size ADVFLOOD_TABLE. The
 * table size should be whatever you expect the maximum number of
 * different users (unique user || host) flooding simultaneously + ~10. If
 * more than ADVFLOOD_COUNT reconnects and/or nick changes are detected
 * from the same user@host in less than ADVFLOOD_DELAY seconds, advanced
 * flood protection will fire off.
 * - If ADVFLOOD_NOTIFY is defined, +y opers on OperServ will be notified
 *   of the flood. If ADVFLOOD_NOTIFY_ALL is defined, notices regarding
 *   floods will be sent out to all opers that idented to OperServ.
 * - If ADVFLOOD_GLINE is defined, offenders will be auto-glined with
 *   reason ADVFLOOD_GLINE_REASON with a GLINE expiring after
 *   ADVFLOOD_GLINE_TIME.
 * - It is possible to define both ADVFLOOD_NOTIFY and ADVFLOOD_GLINE, but
 *   not both ADVFLOOD_NOTIFY and ADVFLOOD_NOTIFY_ALL.
 * - If ADVFLOOD_NOIDENT_GLINEHOST is defined, if a flood is detected from
 *   a non-idented user, the entire host will be glined, not just the user
 *   (since it's probably a script randomly choosing idents).
 */
#undef    ADVFLOOD
#define   ADVFLOOD_TABLE  60 
#define   ADVFLOOD_DELAY  10
#define   ADVFLOOD_COUNT  10 
#define   ADVFLOOD_NOTIFY
#undef    ADVFLOOD_NOTIFY_ALL
#define   ADVFLOOD_GLINE
#define   ADVFLOOD_GLINE_REASON "Reconnect / NICK flooding."
#define   ADVFLOOD_GLINE_TIME   "1h"
#define   ADVFLOOD_NOIDENT_GLINEHOST

/*
 * Defining this will make services capable of detecting so called
 * "services fight", unpleasant situation when two or more services are
 * fighting over their nicknames and causing HTM.
 */
#define   SERVICES_FIGHT_FIX

/*
 * <<STRONGLY RECOMMENDED>> Forces nick change instead of disconnecting
 * the user (when kill protection is set). If users client has not changed
 * its nickname after predefined timeout, kill him as usual.
 */
#define   FORCE_NICK_CHANGE

/*
 * Alternative nick changing methods - SVSNICK and FORCENICK.
 * SVSNICK should be supported on recent Ratbox or Hybrid7. FORCENICK
 * should work on any recent Hybrid7 server, with module
 * contrib/m_forcenick.c compiled and installed (instead of using
 * SVSNICK).
 * I generally find either of those (they have same functionality) rather
 * useful instead of mass killing collided users.  Additionally, there is
 * FORCENICK_LEN/SVSNICK_LEN which can be used to specify how many
 * additional characters you want to fill in as random numbers. When
 * undefined, it pads as much numbers as in can get to fill the nickname
 * length.
 */
#undef    FORCENICK
#define   FORCENICK_LEN 4
#define   FORCENICK_PREFIX "Guest"
#undef    SVSNICK
#define   SVSNICK_LEN 4
#define   SVSNICK_PREFIX "Guest"

/*
 * << STRONGLY RECOMMENDED >> If you've defined FORCENICK or SVSNICK above
 * and some servers on your network don't have support for them, setting
 * FALLBACK_TO_KILL will KILL them after the forced nick change fails.
 */
#define   FALLBACK_TO_KILL

/*
 * Schedule nick kill instead of immediate killing for user-triggered
 * ghost command. Turn this on on very large networks to have smoother
 * operation. Beware that nick kills resolution is only every 30 seconds.
 */
#define   SCHEDULE_COLLIDE

/*
 * Define this if you want to have IPv6-capable hybserv.conf. Please note
 * that you need to sed -e 's/:/|/g' first, since new delimiter becomes
 * '|' character.
 */
#undef IPV6CONF

/* --- Don't touch unless you know exactly what are you doing --- */

/*
 * This will give MUCH CPU overhead, and usually should not be enabled.
 * This code makes double-checks for duplicate nicks in nick.db which
 * shouldn't happen otherwise, but as a result of sloppy coding in
 * previous hybserv releases. No, not my fault. I'm shipping it this way,
 * so that all databases will be checked and fixed. If you know what are
 * you doing, you can disable it.
 */
#undef    STRICT_DATA_CHECK

/* -------------------------------------------------------------- */
/* ------------------- End of configurable section -------------- */
/* -------------------------------------------------------------- */

#if defined ADVFLOOD_NOTIFY && defined ADVFLOOD_NOTIFY_ALL
# undef ADVFLOOD_NOTIFY
#endif

#if defined HYBRID7
# undef GECOSBANS
#endif

#if defined HYBRID7
# undef DANCER
# undef HYBRID_GLINES
#endif

#if defined HYBRID7 && !defined HYBRID_ONLY 
# define HYBRID_ONLY
#endif

#define NICKSERVICES
#define CHANNELSERVICES

#if defined BLOCK_ALLOCATION && !defined CLIENT_ALLOCATE
# define CLIENT_ALLOCATE 256
#endif

#if defined BLOCK_ALLOCATION && !defined CHANNEL_ALLOCATE
# define CHANNEL_ALLOCATE 256
#endif

#if defined BLOCK_ALLOCATION && !defined SERVER_ALLOCATE
# define SERVER_ALLOCATE 5
#endif

#if defined HIGHTRAFFIC_MODE && !defined RECVLOAD
# define RECVLOAD 25
#endif

#if defined HIGHTRAFFIC_MODE && !defined HTM_TIMEOUT
# define HTM_TIMEOUT 30
#endif

#if defined HIGHTRAFFIC_MODE && !defined HTM_INTERVAL
# define HTM_INTERVAL 5
#endif

#if defined HIGHTRAFFIC_MODE && !defined HTM_RATIO
# define HTM_RATIO 3
#endif

#if !defined CRYPT_OPER_PASSWORDS && !defined CRYPT_PASSWORDS
# undef BORKPASSWD
#endif

#if !defined HYBRID7
# undef FORCENICK
# undef HYBRID7_GLINES
# undef HYBRID7_UNKLINE
# undef HYBRID7_HALFOPS
# undef FORCENICK
# undef SVSNICK
#endif

#if defined FORCENICK || defined SVSNICK
# undef FORCE_NICK_CHANGE
#endif

#if defined FORCENICK && defined SVSNICK
# undef FORCENICK
# if defined FORCENICK && !defined FORCENICK_PREFIX
#  define FORCENICK_PREFIX "Guest"
# endif
# if defined SVSNICK && !defined SVSNICK_PREFIX
#  define SVSNICK_PREFIX "Guest"
# endif
#endif

#if !defined ALLOW_JUPES
# undef JUPEVOTES
#else
# if !defined JUPED_USERNAME 
#  define JUPED_USERNAME "juped" 
# endif
# if !defined JUPED_HOSTNAME
#  define JUPED_HOSTNAME "juped.com"
# endif
#endif

#endif /* INCLUDED_config_h */