From ed1b37e1bf2204768fb0070e5b2a9e84ce695569 Mon Sep 17 00:00:00 2001 From: nrzull Date: Wed, 19 Jun 2019 21:14:01 +0500 Subject: [PATCH] fix invalid last arg for executeCommandHandler --- chat2_server.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chat2_server.lua b/chat2_server.lua index 870f95d..bd498fe 100644 --- a/chat2_server.lua +++ b/chat2_server.lua @@ -89,7 +89,14 @@ function handleCommand(client, input) local splittedInput = split(input, " ") local slashCmd = table.remove(splittedInput, 1) local cmd = utf8.sub(slashCmd, 2, utf8.len(slashCmd)) - executeCommandHandler(cmd, client, unpack(splittedInput)) + + local args = "" + for _, arg in ipairs(splittedInput) do + args = string.format("%s %s", args, arg) + end + args = utf8.sub(args, 2, utf8.len(args)) + + executeCommandHandler(cmd, client, args) end -- listen for "say / teamsay" from player console