Skip to content

Commit 3d25914

Browse files
red-001nerzhul
authored andcommittedFeb 18, 2017
Add support for the new arguments of request_shutdown to the /shutdown chatcommand. (#5252)
1 parent d0ce27e commit 3d25914

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎builtin/game/chatcommands.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -836,11 +836,13 @@ core.register_chatcommand("days", {
836836

837837
core.register_chatcommand("shutdown", {
838838
description = "Shutdown server",
839+
params = "[reconnect] [message]",
839840
privs = {server=true},
840841
func = function(name, param)
841842
core.log("action", name .. " shuts down server")
842-
core.request_shutdown()
843843
core.chat_send_all("*** Server shutting down (operator request).")
844+
local reconnect, message = param:match("([^ ]+)(.*)")
845+
core.request_shutdown(message:trim(), minetest.is_yes(reconnect))
844846
end,
845847
})
846848

0 commit comments

Comments
 (0)
Please sign in to comment.