This approach to ban management:
- Offers API access to useful functions.
- Improves the robustness of the data.
- Grants an enhanced view of player accounts and ban records.
- Provides tiered access to player record information.
- Provides an option for automatic ban expiration.
- Provides the capability to pre-emptively ban players.
- Offers increased accessibility via SSH connections to the database with your
favourite database management gui. - Can preserve existing bans by importing records from Minetest or xban2.
This mod depends on the lua module lsqlite3 (https://github.com/LuaDist/lsqlite3) A thin wrapper for the SQLite database engine.
The preferred method is to use luarocks to install it. (https://luarocks.org/)
Download zip file
Browse code on Github
License: MIT license
Commands
The mod provides the following chat console commands. These commands require the ban privilege. The ban_admin and server privileges extend the functionality of some commands.
bang
Launches a GUI. Comprehensive management of bans via a user interface for in-game convenience. On launch the interface shows a hotlist containing the last 10 players to join. Use search to find a player if they are not currently in the list. Multiple record pages are shown if available, accessible via the arrows.
Usage: /bang
ban
Bans a player permanently.
Usage: /ban <name_or_ip> <reason>
Example: /ban Steve Some reason.
The server privilege enables the pre-emptive banning of player names or IP addresses for which the server has no current record.
tempban
Bans a player temporarily.
Usage: /tempban <name_or_ip> <time> <reason>
Example: /tempban Steve 2D Some reason.
The time parameter is a string in the format <count> <unit>, where <unit> is either s for seconds, m for minutes, h for hours, D for days, W for weeks, M for months, or Y for years. If the unit is omitted, it is assumed to mean seconds. For example, 42 means 42 seconds, 1337m means 1337 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.
unban
Unbans a player.
Usage: /unban <name_or_ip> <reason>
Example: /unban Steve Some reason.
Note: this command requires an unban reason.
ban_record
Displays player record and ban record.
Usage: /ban_record <name_or_ip>
Example: /ban_record Steve
This prints the player record and ban record for a player. The records are printed to the chat console with one entry per line.
The player record includes names and, if the user has the ban_admin privilege, IP addresses used by the player. The number of records displayed is limited to 10 by default to prevent chat console spam, and can be adjusted through the sban.display_max setting in minetest.conf.
The ban record includes a list of all ban related actions performed on the player under any known name or IP address. This includes the time a ban came into effect, the expiration time (if applicable), the reason, and the source of the ban.
Note: records of players with the server privilege can only be viewed by other players with the server privilege.
See the readme file for details of the admin commands and settings
Download zip file
Browse code on Github