Garry's Mod

Garry's Mod

BAdmin Admin Mod
Showing 1-10 of 10 entries
Update: Jan 23 @ 7:27am

New load order, new command

Made the admin system initialize for the first time in GM:PostGamemodeLoaded, so that a new hook can be properly utilized; any successive reloads using the reload commands will reload as normal
This new hook allows a server to further fine-tune what is available, and is "BAdmin.AddCommand"; it passes the command name and the settings for it along, and has 3 total returns for controlling it. First is a boolean to overall control whether or not the command should even be added, and the second is a boolean to control overriding settings using the third return
Each of these will modify the console output accordingly, to keep you apprised of any modifications to commands

Also added a new command to use the new(ish) physenv.SetPhysicsPaused function, to overall stop physics from iterating incase someone is being unruly.

Update: Jul 14, 2024 @ 9:43am

New convar, badmin_enablemapvote - Controls usage of !votemap and the console command for the same thing, for purposes of a gamemode having its own mapvote system

Update: May 28, 2023 @ 12:46pm

Restructuring!
The main file has now been broken up into multiple smaller files, split up into various folders
There is now a staged loading system as well, loading in this order:
- Core (files required by BAdmin to run)
- Core commands (commands that come included in BAdmin)
- Gamemode commands (files found in <active gamemode>/badmin/addon/<file>)
- Addon commands (files found in <addon>/lua/badmin/addon/<file>)

Easily visible in the git repo, there is an example command commented in badmin/core/commands.lua which you can use to make your own commands that will be loaded by BAdmin
Furthermore, you can see how the commands are structured in the core commands files

Many of the functions integral to BAdmin functioning were moved to the namespace as well, for ease of use and understanding

3 new commands for superadmins/RCON to use
@@ba_reload - Reloads the entire addon
@@ba_indreload - Reloads an individual file used by BAdmin
@@ba_indreloadlist - Lists all of the files used by BAdmin

There is also more verbose output to the console when BAdmin is doing anything, so its easier to understand

Autocomplete now will also highlight green the command that will be filled into your chatbar if you press tab

Update: Jan 31, 2022 @ 11:46am

Minor fixes:
Consolidated initial rank setting so it works properly for singleplayer/listen servers and looks neater
Made adding CPPI-based commands wait on the gamemode to initialize, as that is when a CPPI compliant prop protection addon is fully realized

Update: Jan 10, 2022 @ 8:59pm

Velocity is now nullified when teleporting
Also a minor fix to rank display when in singleplayer/listen servers

Update: Nov 23, 2021 @ 8:46pm

Speculative fix for UserGroup not properly applying on loading in

Update: Oct 24, 2021 @ 8:50am

Updated usergroup functions to actually use the built-in commands as well as applying the ranks to a NWVar, so other functions like IsAdmin works properly
Originally wasn't used as testing found these to not work like I thought it would, but going to keep them in now.

Also adjusted where the initial print informing the player of their rank happened, so now it will actually reach the player.

Update: Oct 4, 2021 @ 6:01pm

Added sounds to votemap

Update: Oct 4, 2021 @ 5:15pm

Added plenty of new commands
- god
- spec
- obs
- return
- bring
- setjail
- jail
- freezemap
- freezeprops (requires a prop protection mod!)

Also changed bans to be stored as SteamID64
There are several new convars that you can change from the console, as well as one original one that alters some functionality
sbox_noclip- Disabling this disables all teleporting
badmin_allowgodmode- Determines if godmode commands can be used
badmin_allowfamilyshare- Determines if accounts playing GMod through FamilyShare are allowed on the server
badmin_jailautoban- If this is not 0, automatically bans anyone that left before their jailtime was over for the amount of minutes set

Also packaged a votemap script along with this, and is accessible by either console 'votemap' or the chat command !votemap
Loads all of the maps it can find and allows players to vote on one
It breaks ties as well as knows what wins
Admins can veto the vote, or force a map to a certain one, and even do so instantly

Update: Aug 23, 2021 @ 7:43pm