Configuration file syntax

From UnrealIRCd documentation wiki
Jump to navigation Jump to search
Outdated translations are marked like this.
Other languages:

UnrealIRCd configuration files use a block-based format. Each entry or block has a specific format. The format works like:

<block-name> <block-value> {
	<block-directive> <directive-value>;

<block-name> is the type of block, such as me for the Me block, or admin for the Admin block.

<block-value> may not always be present, but if it is then it may have two meanings: 1) sometimes it specifies a value, such as bobsmith in oper bobsmith {, 2) other times it defines a sub-type, like with deny dcc {.

<block-directive> is an individual variable specific to the block. <directive-value> is the associated value (if any). If <directive-value> contains spaces or characters that represents a comment it must be contained in double quotes like somevar "some value with spaces in it";. (By the way, if you want to use a quote character inside a quoted string then use \" and it will be understood as a quote character).

Finally, a <block-directive> may also have directives in it, and so on and so on.

Note: the configuration file is currently case sensitive so BLOCK-NAME is not the same as block-name.

IMPORTANT: You must terminate each line with a ; and terminate each block with a }. Only the start and end of the block (eg: me {) has no terminating ; character. If you forget a } or ; somewhere then UnrealIRCd will fail to read your configuration file correctly and will not boot!

Examples (correct):

me {
        name "";
        sid 001;
        info "Some nice server";
log ircd.log {
        flags {
set {
        maxchannelsperuser 10;

        options {
        anti-flood {
                connect-flood 3:60;
                nick-flood 3:60;

Important: there is a special notation used to talk about entries in the config file and we use it throughout the UnrealIRCd documentation. Take the first example from above (the me block), the name is set to, we call this variable me::name. Similarly, in the last example we would refer to the connect-flood directive as set::anti-flood::connect-flood, and we call that block the set::anti-flood block.

You can also put comments in the configuration file. Comments are text that isn't interpreted by UnrealIRCd and it's entirely up to you if you use it and what you write. UnrealIRCd supports 3 types of comments:

# This is a single line comment (type 1)
// This is also a single line comment (type 2)
/* This is a
   multi line
   comment */

Now that you know how the configuration file works in principle, copy conf/examples/example.conf to conf/ and rename it to unrealircd.conf. Walk through it block per block, line by line. If you want to know more about a specific section then see the top of the Configuration article for all the available blocks and directives.