mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
Replace convar with lua check (#1256)
This commit is contained in:
parent
ced6c7d36e
commit
0330c223bf
@ -5,11 +5,10 @@
|
||||
util.AddNetworkString("pac3_test_suite_backdoor_receive_results")
|
||||
util.AddNetworkString("pac3_test_suite_backdoor")
|
||||
|
||||
local enabledConvar = CreateConVar("pac_test_suite_backdoor_enabled", "0", {FCVAR_PROTECTED}, "Should the pac test suite backdoor be enabled, this allows lua access for superadmins.", 0, 1)
|
||||
|
||||
net.Receive("pac3_test_suite_backdoor", function(len, ply)
|
||||
-- needs to be enabled through lua first, eg lua_run pac.test_suite_backdoor_enabled = true
|
||||
if not pac.test_suite_backdoor_enabled then return end
|
||||
-- need to be at least super admin
|
||||
if not enabledConvar:GetBool() then return end
|
||||
if not ply:IsSuperAdmin() then return end
|
||||
|
||||
local id = net.ReadString()
|
||||
|
Loading…
Reference in New Issue
Block a user