optional quoted args, update lib

This commit is contained in:
Er2 2022-02-13 15:21:44 +03:00
parent 65b2f6eebc
commit 3bbccb94ab
3 changed files with 4 additions and 3 deletions

@ -1 +1 @@
Subproject commit e8a127093213a52b0f8513f72fe7c0566b786158
Subproject commit fefafd4923e824cb5a7f762c7e65d24cdc1f8d87

View file

@ -39,7 +39,7 @@ return {
api = owner and C.api or nil,
}
for k,v in pairs(env) do t[k] = v end
local e, err = load(table.concat(msg.args, ' '), 'eval', 't', t)
local e, err = load(C.api.unparseArgs(msg.args), 'eval', 't', t)
xpcall(function()
if err then error(err) end
e = tostring(e() or '...')

View file

@ -15,6 +15,7 @@
api:send(msg, C.locale:get('error', 'adm_cmd', l))
else
if cmd.useQArgs then msg.args = api.parseArgs(api.unparseArgs(msg.args)) end
msg.loc = C.locale:get('cmds', msg.cmd, l)
local succ, err = pcall(cmd.run, C, msg, owner)
if not succ then