Tip of the day: You can use a SSL/TLS certificate fingerprints to exempt trusted users from server bans or allow them to send more commands per second. |
Configuration file syntax
UnrealIRCd configuration files use a block-based format. Each entry or block has a specific format. The format works like:
block-name block-value { item 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:
- sometimes it specifies a value, such as
bobsmith
inoper bobsmith {
- other times it defines a sub-type, like
dcc
indeny dcc {
item
is an individual variable specific to the block. value
is the associated value (if any). If the 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 item
may also have directives in it (child items), and so on and so on.
NOTES:
- The configuration file is case sensitive so
BLOCK-NAME
is not the same asblock-name
. - You should use double quotes for files that need to have their content read, like
include "https://user:[email protected]/restricted/opers.conf";
and single quotes when you want the string to be used as is, likeadmin { 'Bob Smith'; 'bob'; 'https://domain.tld'; };
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:
me { name "irc.something.net"; sid 001; info "Some nice server"; }
log ircd.log { flags { errors; } }
set { maxchannelsperuser 10; options { hide-ulines; } 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: in the me
block the name
is set to irc.something.net
, 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. It does not mean you literally write set::anti-flood
in the config file.
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 the file to unrealircd.conf
. Then, walk through the unrealircd.conf file block per block, line by line. If you want to know more about a specific section that you read in unrealircd.conf, then see the top of the Configuration article for all the available blocks and directives.