From 3a8a0450c82ca44eedb60e6a8d281d262d4193f4 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 13 Jul 2015 12:28:47 +0200 Subject: [PATCH] update example conf --- doc/conf/examples/example.conf | 124 +++++++++++++++++++++------------ 1 file changed, 78 insertions(+), 46 deletions(-) diff --git a/doc/conf/examples/example.conf b/doc/conf/examples/example.conf index fca5e6f51..ebfd4b4fa 100644 --- a/doc/conf/examples/example.conf +++ b/doc/conf/examples/example.conf @@ -1,29 +1,40 @@ -/* Example configuration for UnrealIRCd 3.4.x +/* Configuration file for UnrealIRCd 3.4.x * - * Simply copy this file to your main Unreal3.4 directory, call it + * Simply copy this file to your conf/ directory, call it * 'unrealircd.conf' and walk through it line by line (edit it!) * * Important: All lines, except the opening { line, end with an ; * including };. This is very important, if you miss a ; somewhere then * the configuration file parser will complain and your file will not * be processed correctly! + * If this is your first experience with an UnrealIRCd configuration + * file then we really recommend you to read a little about the syntax, + * this only takes a few minutes and will help you a lot: + * https://www.unrealircd.org/docs/Configuration#Configuration_file_syntax * - * Documentation: - * https://www.unrealircd.org/unreal32docs.html (TODO: update for 3.4.x) - * FAQ: - * https://www.unrealircd.org/faq + * UnrealIRCd 3.4.x documentation (very extensive!): + * https://www.unrealircd.org/docs/UnrealIRCd_3.4.x_documentation + * + * Frequently Asked Questions: + * https://www.unrealircd.org/docs/FAQ * - * Our (online) documentation is very extensive. If you try to edit this - * file without reading the documentation you are likely to fail. */ /* This is a comment, all text here is ignored (comment type #1) */ // This is also a comment, this line is ignored (comment type #2) # This is also a comment, again this line is ignored (comment type #3) -/* UnrealIRCd makes heavy use of modules. By using this include we - * tell the ircd to read the file 'modules.default.conf' which contains - * more than 150 loadmodule lines that load all the necessary modules. +/* UnrealIRCd makes heavy use of modules. Modules allow you to completely + * customize the featureset you wish to enable in UnrealIRCd. + * See: https://www.unrealircd.org/docs/Modules + * + * By using the include below we instruct the IRCd to read the file + * 'modules.default.conf' which will load more than 150 modules + * shipped with UnrealIRCd. In other words: this will simply load + * all the available features in UnrealIRCd. + * If you are setting up UnrealIRCd for the first time we suggest you + * use this. Then, when everything is up and running you can come + * back later to customize the list (if you wish). */ include "modules.default.conf"; @@ -45,8 +56,7 @@ include "operclass.default.conf"; * letters. The sid must be unique for your IRC network (each server should * have it's own sid). */ -me -{ +me { name "irc.foonet.com"; info "FooNet Server"; sid "001"; @@ -78,6 +88,15 @@ class clients recvq 8000; }; +/* Special class for IRCOps with higher limits */ +class opers +{ + pingfreq 90; + maxclients 50; + sendq 1M; + recvq 8000; +}; + /* Server class with good defaults */ class servers { @@ -89,9 +108,9 @@ class servers /* Allow blocks define which clients may connect to this server. * This allows you to add a server password or restrict the server to - * specific IP's only. - * Additionally, you can set a maximum connections per IP in the allow - * block, which something that is very important on a public server. + * specific IP's only. You also configure the maximum connections + * allowed per IP here. + * See also: https://www.unrealircd.org/docs/Allow_block */ /* Allow everyone in, but only 5 connections per IP */ @@ -101,8 +120,9 @@ allow { maxperip 5; }; -/* Just as an example: a special allow block for some IP, allowing - * 20 connections on that IP, but only if they provide a password. +/* Example of a special allow block on a specific IP: + * Requires users on that IP to connect with a password. If the password + * is correct then it permits 20 connections on that IP. */ allow { ip *@192.0.2.1; @@ -115,16 +135,21 @@ allow { * IRC Operators are people who have "extra rights" compared to others, * for example they may /KILL other people, initiate server linking, * /JOIN channels even though they are banned, etc. - * See [ADD SOME LINK HERE TO OPER BLOCK ] + * See also: https://www.unrealircd.org/docs/Oper_block */ /* Here is an example oper block for 'bobsmith' with password 'test'. * You MUST change this!! */ oper bobsmith { - class clients; + class opers; mask *@*; password "test"; + /* Oper permissions are defined in an 'operclass' block. + * See https://www.unrealircd.org/docs/Operclass_block + * UnrealIRCd ships with a number of default blocks, see + * the article for a full list. We choose 'netadmin' here. + */ operclass netadmin; swhois "is a Network Administrator"; vhost netadmin.mynet.org; @@ -186,8 +211,10 @@ link hub.mynet.org }; /* U-lines give other servers (even) more power/commands. - * If you use services you should add them here. + * If you use services you must add them here. * NEVER put the name of a (normal) UnrealIRCd server here!!! + * ( If you wonder what Services are then see + * https://www.unrealircd.org/docs/Services ) */ ulines { services.mynet.org; @@ -198,12 +225,15 @@ ulines { * restarts and server kills. */ drpass { - restart "I-love-to-restart"; - die "die-you-stupid"; + restart "restart"; + die "die"; }; -/* The log block defines what should be logged and to what file. */ -/* This is a good default */ +/* The log block defines what should be logged and to what file. + * See also https://www.unrealircd.org/docs/Log_block + */ + +/* This is a good default, it logs almost everything */ log "ircd.log" { flags { oper; @@ -214,15 +244,15 @@ log "ircd.log" { sadmin-commands; chg-commands; oper-override; + tkl; spamfilter; }; }; -/* With aliases you can create an alias like /SOMETHING to send a message to +/* With "aliases" you can create an alias like /SOMETHING to send a message to * some user or bot. They are usually used for services. - */ - -/* We have a number of pre-set alias files, check out the alias/ directory. + * + * We have a number of pre-set alias files, check out the alias/ directory. * As an example, here we include all aliases used for anope services. */ include "aliases/anope.conf"; @@ -298,10 +328,13 @@ deny channel { class "clients"; }; -/* vhosts allow users to acquire a different "virtual" host */ +/* VHosts (Virtual Hosts) allow users to acquire a different host. + * See https://www.unrealircd.org/docs/Vhost_block + */ -/* example vhost which you can use, on IRC use: /VHOST test test. - * NOTE: only users with an 'unrealircd.com' host may use it. +/* Example vhost which you can use. On IRC type: /VHOST test test + * NOTE: only people with an 'unrealircd.com' host may use it so + * be sure to change the vhost::mask before you test. */ vhost { vhost i.hate.microsefrs.com; @@ -341,13 +374,13 @@ set { /* Server specific configuration */ set { - kline-address "set.this.to.email.address"; /* e-mail shown when a user is banned */ - modes-on-connect "+ixw"; - modes-on-oper "+xwgs"; - oper-auto-join "#opers"; + kline-address "set.this.to.email.address"; /* e-mail or URL shown when a user is banned */ + modes-on-connect "+ixw"; /* when users connect, they will get these user modes */ + modes-on-oper "+xwgs"; /* when someone becomes IRCOp they'll get these modes */ + oper-auto-join "#opers"; /* IRCOps are auto-joined to this channel */ options { - hide-ulines; - show-connect-info; + hide-ulines; /* hide U-lines in /MAP and /LINKS */ + show-connect-info; /* show "looking up your hostname" messages on connect */ }; maxchannelsperuser 10; /* maximum number of channels a user may /JOIN */ @@ -363,18 +396,17 @@ set { /* static-part does the same for /PART */ /* static-part yes; */ - /* Which /STATS to restrict to opers only. - * We suggest to leave it to * (ALL) - */ + /* Which /STATS to restrict to opers only. We suggest to leave it to * (ALL) */ oper-only-stats "*"; /* Anti flood protection */ anti-flood { - nick-flood 3:60; /* 3 nickchanges per 60 seconds (the default) */ - connect-flood 3:60; /* 3 connection (attempts) per 60 seconds */ + nick-flood 3:60; /* 3 nick changes per 60 seconds (the default) */ + connect-flood 3:60; /* 3 connection attempts per 60 seconds (the default) */ + away-flood 4:120; /* 4 times per 2 minutes you may use /AWAY (default) */ }; - /* Spam filter */ + /* Settings for spam filter */ spamfilter { ban-time 1d; /* default duration of a *LINE ban set by spamfilter */ ban-reason "Spam/Advertising"; /* default reason */ @@ -385,8 +417,8 @@ set { /* * Problems or need more help? - * 1) https://www.unrealircd.org/unreal32docs.html [TODO: UPDATE!!!] - * 2) https://www.unrealircd.org/faq <- answers 80% of your questions! + * 1) https://www.unrealircd.org/docs/UnrealIRCd_3.4.x_documentation + * 2) https://www.unrealircd.org/docs/FAQ <- answers 80% of your questions! * 3) If you still have problems you can go irc.unrealircd.org #unreal-support, * note that we require you to READ THE DOCUMENTATION and FAQ first! */