Tip of the day: With the UnrealIRCd administration panel you can add and remove server bans and do other server management from your browser.

Ban user block

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

This block allows you to ban a user@host mask from connecting to the server. This is the same as adding a /KLINE on IRC, though it can also do a bit more complex things.

Syntax

ban user {
	mask <hostmask>;
	reason <reason-for-ban>;
};

The mask in UnrealIRCd 6.1.7 and later is a Mask item, giving you lots of match options and allowing multiple items. In older UnrealIRCd versions it is a single user@host or host entry like *.example.net or an IP mask.

The reason is the reason for a ban being placed.

IMPORTANT: A ban user { } block (and a KLINE) is only a local server ban, therefore the user may still connect to other servers on the network. If you want server-wide bans, use the GLINE command (or Remote includes if you insist on configuration files).

Examples

Simple ban

ban user {
	mask *tirc@*.saturn.bbn.com;
	reason "Idiot";
}

More complex ban

In UnrealIRCd 6.1.7 and later the ban user::mask is a Mask item so you can do more complex bans:

ban user {
    mask {
        country { NL; FR; }
    }
    reason "I hate the Dutch and the French";
}

Ban all except

In UnrealIRCd 6.1.7 and later the ban user::mask is a Mask item, which also allows you to ban all and use except-xxx items, for example except-country.

This way you can ban all countries except a few:

ban user {
	mask {
		mask *;
		exclude-country { NL; DE; FR; }
	}
	reason "Users are not allowed from this country";
}

A better idea is to use require authentication { } instead. That way you can allow everyone in from the selected list of countries, and still allow people from other countries in if they use SASL.

Also note that banning or restricting countries in general is usually not really an effective way to combat drones/troublemakers, especially if you end up allowing big countries.