mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Fixed more command quote errors
This commit is contained in:
@@ -748,11 +748,11 @@ function Commands.run_command(command_event)
|
|||||||
-- Extract quoted arguments
|
-- Extract quoted arguments
|
||||||
local raw_input = command_event.parameter or ''
|
local raw_input = command_event.parameter or ''
|
||||||
local quote_params = {}
|
local quote_params = {}
|
||||||
local input_string = raw_input:gsub(' "[^"]-"', function(word)
|
local input_string = (' '..raw_input):gsub(' "[^"]-"', function(match)
|
||||||
word = word:sub(2)
|
local word = match:sub(2)
|
||||||
local no_spaces = word:gsub('%s', '%%s')
|
local no_spaces = word:gsub('%s', '%%s')
|
||||||
quote_params[no_spaces] = word:sub(2, -2)
|
quote_params[no_spaces] = word:sub(2, -2)
|
||||||
return no_spaces
|
return ' '..no_spaces..' '
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Extract unquoted arguments
|
-- Extract unquoted arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user