Extended Ban Mod for Minetest
This mod attempts to be an improvement to Minetest's ban system.
- It supports normal bans and temporary bans (from 60 seconds up to the end of time, with 1 second granularity).
- Records and joins all accounts using the same IP address and several IP addresses using the same name into a single record, and can ban/unban them as a single user.
- Can ban offline players if you know their IP or username.
- Holds a record of bans for each user, so moderators and administrators can consult it to know if a player is a repeat offender.
- Does not modify the default ban database in any way (`ipban.txt').
- Has an API to ban and check the ban database to allows other mods to manage users (for example, anticheat mods).
Usage
Install the mod as always and rename to `xban2'.
The mod provides the following chat commands:
- Code: Select all
/xban <player_or_ip> <reason>
Ban a player permanently.
- Code: Select all
/xtempban <player_or_ip> <time> <reason>
Ban a player temporarily. The syntax for `<time>' is:
- 1s - Ban for one second.
- 1m - Ban for one minute.
- 1h - Ban for one hour.
- 1D - Ban for one day (24 hours).
- 1W - Ban for one week (7 days).
- 1M - Ban for one month (30 days).
- 1Y - Ban for one year (360 days).
Note that the units are just for convenience. You are not required to provide values within the bounds. It is possible to specify "3600s", which is the same as "60m" or "1h". Also note that the 's' is optional. Specifying just "42" is the same as "42s".
- Code: Select all
/xunban <player_or_ip>
Unban a player.
Advanced Use
- Code: Select all
/xban_record <player_or_ip>
See a player's ban record.
- Code: Select all
/xban_dbi <importer>
Import a database. Valid values for `<importer>' are:
- "minetest" - Import ban list from `ipban.txt' (Minetest ban database).
- "v1" - Import ban list from `players.iplist' (xban v1 database).
All commands except for `/xban_dbi' require `ban' privilege to execute. The `/xban_dbi' command requires `server' privilege.
License: BSD 2 Clause License.
Dependencies: None.
Links
Download .zip
Download .tar.gz
Browse code on Github