mirror of
https://github.com/CFC-Servers/cfc_cl_http_whitelist.git
synced 2025-03-04 03:03:18 -05:00
Add server toggle
This commit is contained in:
parent
c78cdd50c0
commit
07dbaab569
@ -7,11 +7,16 @@ originalFile:Close()
|
||||
|
||||
local f = CompileString( code, "lua/includes/modules/http.lua", false )
|
||||
|
||||
ProtectedCall( include, "cfc_http_restrictions/wraps/http.lua" )
|
||||
if SERVER then
|
||||
local svEnabled = CreateConVar( "cfc_http_restrictions_sv_enabled", "0", FCVAR_ARCHIVE, "Enable server-side HTTP whitelisting", 0, 1 )
|
||||
if svEnabled:GetBool() then
|
||||
ProtectedCall( include, "cfc_http_restrictions/wraps/http.lua" )
|
||||
end
|
||||
end
|
||||
|
||||
if CLIENT then
|
||||
ProtectedCall( include, "cfc_http_restrictions/wraps/http.lua" )
|
||||
ProtectedCall( include, "cfc_http_restrictions/wraps/playURL.lua" )
|
||||
end
|
||||
|
||||
print( "Running wrapped http.lua" )
|
||||
f()
|
||||
|
Loading…
Reference in New Issue
Block a user