Defines and conditional config

In UnrealIRCd 5 you can define variables in the configuration file and use these variables elsewhere in the configuration file. You can also use this for conditional configuration. This can be used by advanced users, especially when sharing settings between servers and trying to use the same configuration files for all your servers.

Defining variables
You can define variables, like: @define $SERVER "hub.example.org"

Using variables
Anywhere in the configuration file you can refer to $VARIABLENAME. For example: me { name "$SERVER"; info "TestNET Server ($SERVER)"; sid 001; }

== Conditional configuration You can use @if for conditional configuration: @if $SERVER == "hub.example.org" link { [..] } @endif

There are only a few operations supported, namely:
 * @if $VARNAME == "something"
 * @if $VARNAME != "something"
 * @if defined($VARNAME)
 * @if !defined($VARNAME)
 * @if module-loaded("somemod")
 * @if !module-loaded("somemod")

The last two are used to check if a module is loaded or not. We use this in help.conf so HELPOP CHMODES only displays certain lines if the module is actually loaded: helpop chmodes { [..] @if module-loaded("chanmodes/noctcp") " C = No CTCPs allowed in the channel [h]"; @endif }