diff options
| author | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
| commit | 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch) | |
| tree | 4486f0784bdf050fd7eb225c0cb9df352ce1f45a /data/example.conf | |
| parent | 781defb7076ddfddf723ca08cd0a518b6657b64f (diff) | |
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'data/example.conf')
| -rw-r--r-- | data/example.conf | 267 |
1 files changed, 146 insertions, 121 deletions
diff --git a/data/example.conf b/data/example.conf index 55390e391..82be8c9b5 100644 --- a/data/example.conf +++ b/data/example.conf @@ -21,6 +21,15 @@ * foo = bar * } * + * Note that nameless blocks are allowed and are often used with comments to allow + * easially 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: @@ -40,11 +49,6 @@ * * "86400", "86400s", "1440m", "24h", "1d" * - * CAUTION: - * Please note that your services might _CRASH_ if you add more format- - * strings (%s, %d, etc.) to custom messages than Anope needs. Use the - * default messages to see how many format-strings are needed. - * * In the documentation for each directive, one of the following will be * included to indicate whether an option is required: * @@ -106,19 +110,17 @@ define * the output from it will be included into your configuration. */ -/* -include +#include { type = "file" name = "some.conf" } -include +#include { type = "executable" name = "/usr/bin/wget -q -O - http://some.misconfigured.network.com/services.conf" } -*/ /* * [REQUIRED] IRCd Config @@ -234,7 +236,33 @@ serverinfo * - ratbox * - unreal */ -module { name = "inspircd12" } +module +{ + name = "inspircd20" + + /* + * Some protocol modules can enforce mode locks server-side. This reduces the spam caused by + * services immediately reversing mode changes for locked modes. + * + * If the protocol module you have loaded does not support this, this setting will have no effect. + */ + use_server_side_mlock = yes + + /* + * Some protocol modules can enforce topic locks server-side. This reduces the spam caused by + * services immediately reversing topic changes. + * + * If the protocol module you have loaded does not support this, this setting will have no effect. + */ + use_server_side_topiclock = yes + + /* + * Some IRCds allow "SASL" authentication to let users identify to Services + * during the IRCd user registration process. If set, Services will allow + * authenticating users through this mechanism. + */ + sasl = yes +} /* * [REQUIRED] Network Information @@ -279,6 +307,34 @@ networkinfo * 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 Services. + * + * 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 = ".-" } /* @@ -328,19 +384,6 @@ options #seed = 9866235 /* - * Allows Services to continue file write operations (i.e. database saving) - * even if the original file cannot be backed up. Enabling this option may - * allow Services to continue operation under conditions where it might - * otherwise fail, such as a nearly-full disk. - * - * NOTE: Enabling this option can cause irrecoverable data loss under some - * conditions, so make CERTAIN you know what you're doing when you enable it! - * - * This directive is optional, and you are discouraged against enabling it. - */ - #nobackupokay = yes - - /* * If set, Services will perform more stringent checks on passwords. If this * isn't set, Services will only disallow a password if it is the same as the * entity (nickname name) with which it is associated. When set, however, @@ -406,41 +449,15 @@ options * will use doing this. Higher values will cause less accurate timing but * less CPU usage. * - * This shouldn't be set any higher than 10 seconds, and 1 second is best - * if your system is powerful enough (or your network small enough) to - * handle it. 0 will cause the timeout list to be checked every time - * through the main loop, which will probably slow down Services too much - * to be useful on most networks. - * * Note that this value is not an absolute limit on the period between * checks of the timeout list; the previous may be as great as readtimeout * (above) during periods of inactivity. * - * If this directive is not given, it will default to 0. See the 2nd paragraph - * above for performance impacts if you do this. + * If this directive is not given, it will default to 0. */ timeoutcheck = 3s /* - * Sets the number of days backups of databases are kept. If you don't give it, - * or if you set it to 0, Services won't backup the databases. - * - * NOTE: Services must run 24 hours a day for this feature to work. - * - * This directive is optional, but recommended. - */ - keepbackups = 3 - - /* - * If set, Services will require a reason when a FORBID is added, else the - * reason is optional. This directive also applies to SUSPENDed channels as - * well. - * - * This directive is optional. - */ - forceforbidreason = yes - - /* * If set, this will allow users to let Services send PRIVMSGs to them * instead of NOTICEs. Also see the defmsg option of nickserv:defaults, * which also toggles the default communication (PRIVMSG or NOTICE) to @@ -471,35 +488,6 @@ options #hidestatso = yes /* - * Prevents users from registering their nick if they are not connected - * for at least the given number of seconds. - * - * This directive is optional. - */ - #nickregdelay = 30 - - /* - * If set, forbids the registration of nicks that contain an existing - * nick with Services access. For example, if Tester is a Services Oper, - * you can't register NewTester or Tester123 unless you are an IRC - * Operator. - * - * NOTE: If you enable this, you will have to be logged in as an IRC - * operator in order to register a Services Root nick when setting up - * Anope for the first time. - * - * This directive is optional. - */ - #restrictopernicks = yes - - /* - * The number of LOGON/OPER news items to display when a user logs on. - * - * This directive is optional, if no set it will default to 3. - */ - #newscount = 3 - - /* * A space-separated list of ulined servers on your network, it is assumed that * the servers in this list are allowed to set channel modes and Services will * not attempt to reverse their mode changes. @@ -511,16 +499,9 @@ options #ulineservers = "stats.your.network" /* - * Modes to set on service bots when they join channels, comment this out for no modes - * - * This directive is optional. - */ - botmodes = "ao" - - /* - * How long to wait between connection retries, in seconds. + * How long to wait between connection retries with the uplink(s). */ - retrywait = 60 + retrywait = 60s /* * If set, Services will hide commands that users don't have the privileges to execute @@ -539,6 +520,39 @@ options * Note for this to work the regex module providing the regex engine must be loaded. */ regexengine = "regex/pcre" + + /* + * A list of languages to load on startup that will be available in /nickserv set language. + * Useful if you translate Anope to your language. (Explained further in docs/LANGUAGE). + * Note that english should not be listed here because it is the base language. + * + * Removing .UTF-8 will instead use the default encoding for the language, eg. iso-8859-1 for western European languages. + */ + languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8" + + /* + * Default language that non- and newly-registered nicks will receive messages in. + * Leave empty to default to English. + */ + #defaultlanguage = "es_ES.UTF-8" + + /* + * The username, and possibly hostname, used for fake users created when Services needs to + * hold a nickname. + */ + enforceruser = "enforcer" + enforcerhost = "localhost.net" + + /* + * The length of time Services hold nicknames. + */ + releasetimeout = 1m + + /* + * When a user's nick is forcibly changed to enforce a "nick kill", their new nick will start + * with this value. The rest will be made up of 6 or 7 digits. + */ + guestnickprefix = "Guest" } /* @@ -865,7 +879,7 @@ opertype * As with all permissions, make sure to only give trustworthy people access to Services. */ -oper +#oper { /* The nickname of this services oper */ #name = "nick1" @@ -893,19 +907,17 @@ oper #vhost = "oper.mynet" } -/* -oper +#oper { name = "nick2" type = "Services Administrator" } -oper +#oper { name = "nick3" type = "Helper" } -*/ /* * [OPTIONAL] Mail Config @@ -1048,9 +1060,10 @@ mail * You should only use this to upgrade old databases to a newer database format by loading * other database modules in addition to this one, which will be used when saving databases. */ -#module { name = "db_old" } -db_old +#module { + name = "db_old" + /* * This is the encryption type used by the databases. This must be set correctly or * your passwords will not work. Valid options are: md5, oldmd5, sha1, and plain. @@ -1067,28 +1080,45 @@ db_old * Then unload this and restart Anope, loading from the new database. */ #module { name = "db_plain" } -db_plain -{ - /* - * The database name db_plain should use - */ - database = "anope.db" -} /* * db_flatfile * * This is the default flatfile database format. */ -module { name = "db_flatfile" } -db_flatfile +module { + name = "db_flatfile" + /* * The database name db_flatfile should use */ database = "anope.db" /* + * Sets the number of days backups of databases are kept. If you don't give it, + * or if you set it to 0, Services won't backup the databases. + * + * NOTE: Services must run 24 hours a day for this feature to work. + * + * This directive is optional, but recommended. + */ + keepbackups = 3 + + /* + * Allows Services to continue file write operations (i.e. database saving) + * even if the original file cannot be backed up. Enabling this option may + * allow Services to continue operation under conditions where it might + * otherwise fail, such as a nearly-full disk. + * + * NOTE: Enabling this option can cause irrecoverable data loss under some + * conditions, so make CERTAIN you know what you're doing when you enable it! + * + * This directive is optional, and you are discouraged against enabling it. + */ + #nobackupokay = yes + + /* * If enabled, services will fork a child process to save databases. * * This is only useful with very large databases, with hundreds @@ -1099,29 +1129,24 @@ db_flatfile } /* - * db_sql + * db_sql and db_sql_live * - * This module allows saving and loading databases using one of the SQL engines. + * db_sql module allows saving and loading databases using one of the SQL engines. * This module loads the databases once on startup, then incrementally updates * objects in the database as they are changed within Anope in real time. Changes * to the SQL tables not done by Anope will have no effect and will be overwritten. * - */ -#module { name = "db_sql" } - -/* - * db_sql_live - * - * This module allows saving and loading databases using one of the SQL engines. + * db_sql_live module allows saving and loading databases using one of the SQL engines. * This module reads and writes to SQL in real time. Changes to the SQL tables * will be immediately reflected into Anope. This module should not be loaded * in conjunction with db_sql. + * */ -#module { name = "db_sql_live" } - -/* Configuration block for both db_sql and db_sql_live */ -db_sql +#module { + name = "db_sql" + #name = "db_sql_live + /* * The SQL service db_sql(_live) should use, these are configured in modules.conf. * For MySQL, this should probably be mysql/main. @@ -1210,7 +1235,7 @@ include * Requires a MySQL Database. */ #include -#{ -# type = "file" -# name = "chanstats.example.conf" -#} +{ + type = "file" + name = "chanstats.example.conf" +} |
