From 630972d1591e88ceee6123a3903ef2bacf8c9525 Mon Sep 17 00:00:00 2001 From: Redox <69946827+wrefgtzweve@users.noreply.github.com> Date: Sun, 19 Apr 2026 23:31:58 +0200 Subject: [PATCH] Fix Expression2_CanConCmd not running if whitelist is empty --- lua/entities/gmod_wire_expression2/core/console.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/entities/gmod_wire_expression2/core/console.lua b/lua/entities/gmod_wire_expression2/core/console.lua index 4457f02e65..1bb7234e17 100644 --- a/lua/entities/gmod_wire_expression2/core/console.lua +++ b/lua/entities/gmod_wire_expression2/core/console.lua @@ -61,6 +61,10 @@ local function checkConCmd(self, cmd) 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 @@ -71,10 +75,6 @@ local function checkConCmd(self, cmd) 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