Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lua/entities/gmod_wire_expression2/core/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
if ply:GetInfoNum("wire_expression2_concmd", 0) == 0 then return self:throw("Concmd is disabled through wire_expression2_concmd", false) end
if IsConCommandBlocked(cmd) then return self:throw("This concmd is blacklisted by gmod, see https://wiki.facepunch.com/gmod/Blocked_ConCommands", false) end

if hook.Run( "Expression2_CanConCmd", ply, cmd ) == false then
return self:throw("Command '" .. cmd .. "' was blocked by the server. ", false)
end

local whitelist = getWhitelist(ply, "wire_expression2_concmd_whitelist")
if table.IsEmpty(whitelist) then return true end

Expand All @@ -71,10 +75,6 @@
end
end

if hook.Run( "Expression2_CanConCmd", ply, cmd ) == false then
return self:throw("Command '" .. cmd .. "' was blocked by the server. ", false)
end

return true
end

Expand Down Expand Up @@ -118,11 +118,11 @@
end

e2function number maxOfType(string typename)
if typename == "wire_holograms" then return GetConVarNumber("wire_holograms_max") or 0 end

Check warning on line 121 in lua/entities/gmod_wire_expression2/core/console.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
return GetConVarNumber("sbox_max"..typename) or 0

Check warning on line 122 in lua/entities/gmod_wire_expression2/core/console.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
end

e2function number playerDamage()
local ret = GetConVarNumber("sbox_playershurtplayers") or 0

Check warning on line 126 in lua/entities/gmod_wire_expression2/core/console.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
return ret ~= 0 and 1 or 0
end
Loading