Fix some chatcommands not returning a value (#9503)
authorWuzzy <wuzzy2@mail.ru>
Sat, 14 Mar 2020 14:01:22 +0000 (14:01 +0000)
committerGitHub <noreply@github.com>
Sat, 14 Mar 2020 14:01:22 +0000 (15:01 +0100)
builtin/common/information_formspecs.lua
builtin/game/chat.lua

index b977e2656947a40c9757f2fc0d3072230969a45b..8afa5bc87cbbb253e9836b2c0724fd6ee03ecea4 100644 (file)
@@ -136,14 +136,14 @@ help_command.func = function(name, param)
                core.show_formspec(name, "__builtin:help_privs",
                        build_privs_formspec(name))
                if name ~= admin then
-                       return
+                       return true
                end
        end
        if param == "" or param == "all" then
                core.show_formspec(name, "__builtin:help_cmds",
                        build_chatcommands_formspec(name))
                if name ~= admin then
-                       return
+                       return true
                end
        end
 
index c7162aae1955f7370be40f87eb1c1e92f660632d..fd13791622c085d54429e3deeaa354a3ce39d878 100644 (file)
@@ -115,6 +115,7 @@ core.register_chatcommand("me", {
        privs = {shout=true},
        func = function(name, param)
                core.chat_send_all("* " .. name .. " " .. param)
+               return true
        end,
 })
 
@@ -919,6 +920,7 @@ core.register_chatcommand("shutdown", {
                        core.chat_send_all("*** Server shutting down (operator request).")
                end
                core.request_shutdown(message:trim(), core.is_yes(reconnect), delay)
+               return true
        end,
 })
 
@@ -1001,6 +1003,7 @@ core.register_chatcommand("clearobjects", {
                core.clear_objects(options)
                core.log("action", "Object clearing done.")
                core.chat_send_all("*** Cleared all objects.")
+               return true
        end,
 })