aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/pac
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-08-17 20:08:23 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-08-17 20:08:23 -0400
commit7a31161e59b34d34917a5c8826d5187fd63e844b (patch)
tree85694d3dc3429f2a3c2183f03b5e7c7a818958b3 /gamemode/core/pac
parentfcffbc1ff27a7cb28bab85b223be7060c481bf8b (diff)
downloadartery-7a31161e59b34d34917a5c8826d5187fd63e844b.tar.gz
artery-7a31161e59b34d34917a5c8826d5187fd63e844b.tar.bz2
artery-7a31161e59b34d34917a5c8826d5187fd63e844b.zip
Made console commands admin-only
this was probably a big security bug or something lol
Diffstat (limited to 'gamemode/core/pac')
-rw-r--r--gamemode/core/pac/sv_pac.lua8
1 files changed, 6 insertions, 2 deletions
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()