mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Fix some chatcommands not returning a value (#9503)
This commit is contained in:
parent
8546d6089a
commit
1441281809
@ -136,14 +136,14 @@ help_command.func = function(name, param)
|
|||||||
core.show_formspec(name, "__builtin:help_privs",
|
core.show_formspec(name, "__builtin:help_privs",
|
||||||
build_privs_formspec(name))
|
build_privs_formspec(name))
|
||||||
if name ~= admin then
|
if name ~= admin then
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if param == "" or param == "all" then
|
if param == "" or param == "all" then
|
||||||
core.show_formspec(name, "__builtin:help_cmds",
|
core.show_formspec(name, "__builtin:help_cmds",
|
||||||
build_chatcommands_formspec(name))
|
build_chatcommands_formspec(name))
|
||||||
if name ~= admin then
|
if name ~= admin then
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -115,6 +115,7 @@ core.register_chatcommand("me", {
|
|||||||
privs = {shout=true},
|
privs = {shout=true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
core.chat_send_all("* " .. name .. " " .. param)
|
core.chat_send_all("* " .. name .. " " .. param)
|
||||||
|
return true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -919,6 +920,7 @@ core.register_chatcommand("shutdown", {
|
|||||||
core.chat_send_all("*** Server shutting down (operator request).")
|
core.chat_send_all("*** Server shutting down (operator request).")
|
||||||
end
|
end
|
||||||
core.request_shutdown(message:trim(), core.is_yes(reconnect), delay)
|
core.request_shutdown(message:trim(), core.is_yes(reconnect), delay)
|
||||||
|
return true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1001,6 +1003,7 @@ core.register_chatcommand("clearobjects", {
|
|||||||
core.clear_objects(options)
|
core.clear_objects(options)
|
||||||
core.log("action", "Object clearing done.")
|
core.log("action", "Object clearing done.")
|
||||||
core.chat_send_all("*** Cleared all objects.")
|
core.chat_send_all("*** Cleared all objects.")
|
||||||
|
return true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user