diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-08-06 19:30:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-06 19:30:18 +0100 |
commit | 8e757859d6a6bf6482480904e8485e9344e567ab (patch) | |
tree | 3304aa9393a753b85143389c6f6ffec990cfa12e /builtin/client | |
parent | 8da35c22d1c8933090330b2f3c44b4cf2c6e6760 (diff) | |
download | minetest-8e757859d6a6bf6482480904e8485e9344e567ab.tar.gz minetest-8e757859d6a6bf6482480904e8485e9344e567ab.tar.bz2 minetest-8e757859d6a6bf6482480904e8485e9344e567ab.zip |
Add luacheck to check builtin (#7895)
Diffstat (limited to 'builtin/client')
-rw-r--r-- | builtin/client/chatcommands.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/client/chatcommands.lua b/builtin/client/chatcommands.lua index 201ca4a9b..5cb1b40bb 100644 --- a/builtin/client/chatcommands.lua +++ b/builtin/client/chatcommands.lua @@ -16,7 +16,7 @@ core.register_on_sending_chat_message(function(message) end local cmd, param = string.match(message, "^%.([^ ]+) *(.*)") - param = param or "" + param = param or "" if not cmd then core.display_chat_message(core.gettext("-!- Empty command")) @@ -26,9 +26,9 @@ core.register_on_sending_chat_message(function(message) local cmd_def = core.registered_chatcommands[cmd] if cmd_def then core.set_last_run_mod(cmd_def.mod_origin) - local _, message = cmd_def.func(param) - if message then - core.display_chat_message(message) + local _, result = cmd_def.func(param) + if result then + core.display_chat_message(result) end else core.display_chat_message(core.gettext("-!- Invalid command: ") .. cmd) |