1.8 KB


Apply vhosts at connect time based on users' raw nick formats or IP addresses. The vhosts are entered in unrealircd.conf and they must be at least 5 chars in length. Furthermore, you can only enter the host part for the new host (so not ident@host).

There are some dynamic variables you can specify in the config, which will be replaced with a certain value on user connect:

  • $nick: nickname 0bv m8
  • $ident: ident/username 0bv m9
  • $account: account name from services 0bv m9, keep in mind though that if they don't do any on-connect authentication (like SASL) the vhost will be seen as invalid and thus not applied

Add a config block that looks like this:

autovhost {
	// Just some simple nick!user@host matches
	*!* $nick.big.heks;
	*!* $ident.big.heks;
	*!* $account.big.heks;

	// You can also use CIDR notation $account.premium.lan;

	// You can even combine all that shit
	poo!loo@ $nick.$ident.$

	// Fallback for any other small-network LAN IP
	192.168.* premium.lan;

	// This one will never apply because 192.168.* already matched it some.other.premium.lan;

Vhosts are checked from top to bottom and it will only stop if it can apply one successfully. So if you're connecting from but you're not logged into services, opers will get a message about that vhost being invalid and you will still get the vhost for 192.168.* applied to you.

Keep in mind it replaces virthost and not cloakedhost, so when you do /umode -x this custom vhost is lost (why would you do -x anyways? ;]). Furthermore, services like for example Anope's HostServ could override this vhost as they might set it after we changed it.