Admin Mod

Adds a powerful server administration solution.

By TeslaCloud Studios

Modules

Hooks hooks
Bolt plugin
Bolt is the admin mod of Flux: roles, permissions, bans, and the commands and menus that manage them.
Globals globals
Migration that adds the admin_name and admin_steam_id columns to the bans table.
Migration that adds foreign keys with ON DELETE CASCADE from the character_id column of the character_permissions and character_temp_permissions tables to characters, so that the database deletes the permissions of a character together with it, also when the character is deleted along with its user rather than by the plugin.
Ban class
Database record of a ban: the banned player's name and SteamID, the reason, the duration in seconds (0 for a permanent ban), the time at which the ban ends, and the Steam name and SteamID of the player who issued it (admin_name and admin_steam_id, empty for a ban made from the server console or by code).
Database record of a permission set on a single character: the permission ID and its PERM_ value, which is kept in the object column.
Database record of a temporary permission of a character: the permission ID, its PERM_ value (the object column) and the time at which it expires.
Migration that creates the tables of the admin plugin, permissions, temp_permissions and bans, and adds the role and banned columns to users.
Migration that creates the tables of the character permissions of the admin plugin, character_permissions and character_temp_permissions.
Entity class
Entity extensions of the admin plugin: hiding an entity from chosen players by stopping its transmission to them, which the Vanish command is built on.
Database record of a permission set on a single user: the permission ID and its PERM_ value, which is kept in the object column.
Player class
Player extensions of the admin plugin: the player's role, their individual and temporary permissions, those of their active character, and the staff level checks.
Migration that gives the gamemaster role to every user whose stored role is moderator, which is not a registered role.
Role class
A role is a group of players that share a set of permissions, such as gamemaster.
Database record of a temporary permission of a user: the permission ID, its PERM_ value (the object column) and the time at which it expires.

Commands

Announce command
The Announce command shows a notice with the given text to every player on the server.
Ban command
The Ban command bans players and lifts bans.
Bots command
The Bots command manages the bots of the server: /bots add [amount] adds bots (1 by default, 128 at most), /bots kick kicks every bot, and /bots freeze and /bots unfreeze freeze and unfreeze all bots through the bot_zombie console variable.
Changelevel command
The Changelevel command changes the map to the given one, optionally after a delay in seconds: /changelevel <map> [delay].
The CharPermission command manages the permissions of the characters that players have loaded.
Freeze command
The Freeze command freezes players in place and unfreezes them: /freeze on <target> and /freeze off <target>.
Fullbright command
The Fullbright command turns fullbright rendering, which ignores the map's lighting, on or off for players: /fullbright on <target> and /fullbright off <target>.
Godmode command
The Godmode command turns god mode on or off for players: /godmode on <target> and /godmode off <target>.
Kick command
The Kick command kicks the targeted players from the server, with an optional reason.
Permission command
The Permission command manages the permissions that players have of their own, on top of what their role allows.
Respawn command
The Respawn command respawns the targeted players, dead or alive, either where they are (stay, the default) or at the spot the caller is looking at (tp).
Restart command
The Restart command reloads the current map, optionally after a delay in seconds.
Return command
The Return command teleports the targeted players back to where they were before they were last teleported.
Role command
The Role command sets and removes the roles of players.
Send command
The Send command teleports the targeted players to another player.
Slay command
The Slay command kills the targeted players.
Staff command
The Staff command sends a chat message that only the online players with the staff permission receive.
Tp command
The Tp command teleports the targeted players to the spot the caller is looking at.
Tpto command
The Tpto command teleports the caller to the targeted player.
Vanish command
The Vanish command hides players from everyone who lacks the moderate permission and shows them again: /vanish on <target> and /vanish off <target>.
Warn command
The Warn command sends the targeted players a warning with the given reason.

Roles

The Administrator role (admin): based on gamemaster, with an immunity of 300.
The Assistant role (assistant): the first staff role, based on user, with an immunity of 100.
The Gamemaster role (gamemaster): based on assistant, with an immunity of 200.
User role
The User role (user): the role of every player who has not been given another one, with an immunity of 0.

Panels

The admin panel shown by the Admin entry of the tab menu: a sidebar of page buttons and the page that is currently open.
The ban list page (fl_ban_list): a search field, the buttons that turn the pages and a scrollable list with an fl_ban_row for every ban on the current page.
The line of one ban in the ban list (fl_ban_row): the name and the SteamID of the banned player, the reason and who issued the ban, the time the ban has left and a button that lifts it after a confirmation.
The config editor page: a scrollable list of collapsible config categories, each filled with fl_config_line rows.
A row of the config editor: the name of a config value, markers for its flags, the control that matches its type (slider, checkbox, text entry, list editor or dropdown) and a button that resets it to its default.
A row of the permission editor: the name of a permission, the allow, not set and never buttons that set its value for the edited player or their character, and what the player may do now together with the layer that decides it.
The permission editor: a switch between the player's own permissions and those of the character they have loaded, and every registered permission, grouped by category, with an fl_permission row each and buttons that set a whole category at once.
Player management page of the admin panel, open to players with the manage_permissions permission: a list of the online players and, for the selected one, a header with their avatar, name and role above the permission editor.
The plugin manager page (fl_plugin_manager): a notice about the restart and a scrollable list with an fl_plugin_row for every known plugin.
The line of one plugin in the plugin manager (fl_plugin_row): a switch that shows whether the plugin is saved as enabled and toggles it, the name of the plugin and its state in this session.
The staff page (fl_staff_list): a scrollable list with a header for every role that has members, the roles with the highest immunity first, and an fl_staff_row for every member.
The line of one staff member in the staff page (fl_staff_row): their name and SteamID, whether they are on the server, and a button that demotes them to user after a confirmation.