Tip of the day: Did you know that users are put in the security-group known-users based on their reputation score or if they are identified to Services?

Users in this group receive a number of benefits, such as being able to send more messages per minute.

Translations:Configuration/16/en

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

TLD block

By default everyone gets to see the same MOTD (ircd.motd file), rules (ircd.rules file), opermotd, etc... With the tld block you can show different files to a user depending on their hostname or IP. This is for example useful if you want different motds for different languages.

The TLD block can also be used if you want to fetch an URL and use that as the default MOTD/RULES. See the last example at the bottom of this page.

Syntax

tld {
	mask <hostmask>;
	motd <motd-file>;
	rules <rules-file>;
	shortmotd <shortmotd-file>;
	opermotd <opermotd-file>;
	botmotd <botmotd-file>;
	channel <channel-name>;
	options {
		tls;
	};
};

The tld::mask is a mask item telling who should be affected by this TLD block.

The tld::motd, tld::shortmotd, tld::opermotd, tld::botmotd, and tld::rules items specify the motd, shortmotd, opermotd, botmotd, and rules file, respectively, to be displayed.

You can also specify tld::channel which makes clients auto join this channel (this will override the default channel(s) in set::auto-join). You can specify multiple channels, eg channel #one,#two,#three;

The tld::options block allows you to define additional requirements (rarely used): tld::options::tls only displays the file for SSL/TLS users, and tld::options::remote which only displays the file for remote users, exists.

TLD entries are matched upside down.

Examples

tld {
	mask *.es;
	motd "ircd.es.motd";
	rules "ircd.es.rules";
}

Or with UnrealIRCd 6.0.4+:

/* Spanish MOTD for Spanish speaking countries */
tld {
	mask { country { ES; AR; BO; CL; CO; CR; DO; EC; SV; GT; HN; MX; NI; PA; PY; PE; PR; UY; VE; } }
	motd "ircd.es.motd";
	rules "ircd.es.rules";
}

You can also use URLs:

tld {
	mask { country FR; }
	motd "https://example.org/files/ircd.fr.motd";
	rules "https://example.org/files/ircd.fr.rules";
}

Or just if you want to serve everyone the MOTD/RULES that are fetched remotely (mask *):

tld {
	mask *;
	motd "https://example.org/files/ircd.motd";
	rules "https://example.org/files/ircd.rules";
}