Skip to content

Commit ef0d9d6

Browse files
committed
limit pac settings manager
only allow change if requested cvar is from the table
1 parent eeee167 commit ef0d9d6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lua/pac3/editor/server/pac_settings_manager.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@ net.Receive("pac_send_sv_cvar", function(len,ply)
8989
local val = net.ReadString()
9090
if not cmd then return end
9191

92-
if GetConVar(cmd) then
93-
GetConVar(cmd):SetString(val)
92+
for i,v in ipairs(pac_server_cvars) do
93+
if v[1] == cmd then
94+
if GetConVar(cmd) then
95+
GetConVar(cmd):SetString(val)
96+
end
97+
return
98+
end
9499
end
95-
96100
end)
97101

98102
net.Receive("pac_request_sv_cvars", function (len, ply)

0 commit comments

Comments
 (0)