mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-20 07:23:13 +09:00
Fixed Command Middleware Bug
This commit is contained in:
1 parent
ec9a8db362
commit
b601664526
4 files changed
+23
-14
No files matched your search
@@ -209,7 +209,7 @@ local function run_custom_command(command)
|
||||
local player = Game.get_player(command) or SERVER
|
||||
-- runs all middle ware if any, if there is no middle where then it relyis on .default_admin_only
|
||||
if #middleware > 0 then for _,callback in pairs(middleware) do
|
||||
local success, err = pcall(callback,player_name,command.name,command)
|
||||
local success, err = pcall(callback,player,command.name,command)
|
||||
if not success then error(err)
|
||||
elseif not err then
|
||||
player_return({'ExpGamingCore_Command.unauthorized'},defines.textcolor.crit)
|
||||
|
||||
Reference in new issue
Block a user