]> git.lizzy.rs Git - dragonfireclient.git/commit
Lua API: Add register_on_chatcommand to SSM and CSM (#7862)
authorElijah Duffy <enduffy2014@outlook.com>
Sat, 3 Oct 2020 16:38:08 +0000 (09:38 -0700)
committerGitHub <noreply@github.com>
Sat, 3 Oct 2020 16:38:08 +0000 (17:38 +0100)
commit7d3641021b755be133dea58404fcb039211fbe52
treebd62b4e197492242c84d6e001dfefc8090389b33
parent07500479191ed927ab661b3758ffcd2fd43158c5
Lua API: Add register_on_chatcommand to SSM and CSM (#7862)

Allows catching a chatcommand call just after the command and the
parameters are parsed but before its existence is checked and before the
corresponding function is run. Returning `true` from a callback function
will prevent default handling of the command leaving mods to handle the
command manually.
builtin/client/chatcommands.lua
builtin/client/register.lua
builtin/game/chat.lua
builtin/game/register.lua
clientmods/preview/init.lua
doc/client_lua_api.txt
doc/lua_api.txt
games/devtest/mods/experimental/commands.lua