diff options
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) |