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).
The mod provides the following chat commands. All commands require the
Bans a player permanently.
/xban <player_or_ip> <reason>
/xban 127.0.0.1 Some reason.
Bans a player temporarily.
/xtempban <player_or_ip> <time> <reason>
time parameter is a string in the format
is one of
s for seconds,
m for minutes,
h for hours,
D for days,
M for months, or
Y for years. If the unit is omitted, it is
assumed to mean seconds. For example,
42s means 42 seconds,
minutes, and so on. You can chain more than one such group and they will add
up. For example,
1Y3M3D7h will ban for 1 year, 3 months, 3 days and 7 hours.
/xtempban Joe 3d Some reason.
Unbans a player.
Shows the ban record on chat.
This prints one ban entry per line, with the time the ban came into effect, the expiration time (if applicable), the reason, and the source of the ban. The record is printed to chat with one entry per line.
Manages the whitelist.
/xban_wl (add|del|get) <player_or_ip>
Whitelisted players are allowed on the server even if it's otherwise marked as banned. This is useful to only allow certain users from shared computers, for example.
add subcommand adds the player to the whitelist. The
removes the player from the whitelist. The
get subcommand checks if the
player is in the whitelist, and prints the status to chat.
/xban_record add Jane
Shows a form to consult the database interactively.
The following commands require the
server privilege, so they are only
available to server administrators.
Imports ban entries from other database formats.
importer argument specifies from which database to import. These are
the supported import plugins at the time of writing:
minetest: Import entries from Minetest's ban list (
v1: Old format used by xban (
v2: Old format used by xban (
Removes all non-banned entries from the xban db.
Great mod, however..
As a moderator on the reigning most popular long term server of Minetest (held its own for several years, though many players on other servers despise the type of persons they see on it for some reason), on reports from other staff, and the realization that banned players keep coming back to the game and causing issues, I realized that the database can only hold so many ban entries/information before it resets itself, and those freshly banned or very troublesome players come back to the game before they've calmed down.
To combat this space issue, there are a variety of methods you can use.
One is compression, using the functions built into the Minetest LuaJIT 5.1 beta 3 addon subsystem, or the C++ engine for mapblock/chunk compression (not the acclaimed pglz, agiannis, LZ77, K5, ZPAQ, or a trained Zstd algorithm like how Facebook and other data aggrigators use unfortunately).
Another is increasing the database size, or splitting it up into separate parts that each are capable of holding more total or specific storage, for example the bans would stick around, but the ban reasons would fill up and overwrite the first entries or reset instead of releasing all those players back into the game.
And I'm sure there are lots of other methods that can be used to make this ubiquitously used mod better, but I'm no expert.