From 7a31161e59b34d34917a5c8826d5187fd63e844b Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 17 Aug 2017 20:08:23 -0400 Subject: Made console commands admin-only this was probably a big security bug or something lol --- gamemode/core/pac/sv_pac.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gamemode/core/pac/sv_pac.lua') diff --git a/gamemode/core/pac/sv_pac.lua b/gamemode/core/pac/sv_pac.lua index ad54106..6b60340 100644 --- a/gamemode/core/pac/sv_pac.lua +++ b/gamemode/core/pac/sv_pac.lua @@ -69,7 +69,10 @@ local function loadhashes() end end loadhashes() -concommand.Add("artery_reload_pac_hashes",loadhashes) +concommand.Add("artery_reload_pac_hashes",function(ply,cmd,args) + if not ply:IsAdmin() then return end + loadhashes() +end) concommand.Add("artery_print_pac_hashes",function(ply,cmd,args) PrintTable(pachashes) end) @@ -187,7 +190,8 @@ net.Receive("artery_requestpac",function(ln,ply) end) --Does all the things needed to edit pac's live -concommand.Add("artery_reload_pacs",function() +concommand.Add("artery_reload_pacs",function(ply,cmd,args) + if not ply:IsAdmin() then return end pac_cache = {} pacs_in_cache = 0 loadhashes() -- cgit v1.2.3-70-g09d2