Fixed more command quote errors

This commit is contained in:
Cooldude2606
2020-06-04 13:53:52 +01:00
parent db2c47ed9b
commit 8e1399e4fa

View File

@@ -748,11 +748,11 @@ function Commands.run_command(command_event)
-- Extract quoted arguments
local raw_input = command_event.parameter or ''
local quote_params = {}
local input_string = raw_input:gsub(' "[^"]-"', function(word)
word = word:sub(2)
local input_string = (' '..raw_input):gsub(' "[^"]-"', function(match)
local word = match:sub(2)
local no_spaces = word:gsub('%s', '%%s')
quote_params[no_spaces] = word:sub(2, -2)
return no_spaces
return ' '..no_spaces..' '
end)
-- Extract unquoted arguments