Skip to content
Permalink
Browse files

Add support for the new arguments of `request_shutdown` to the `/shut…

…down` chatcommand. (#5252)
  • Loading branch information...
red-001 authored and nerzhul committed Feb 18, 2017
1 parent d0ce27e commit 3d25914986845dcb789d372ec7c20d15e310572a
Showing with 3 additions and 1 deletion.
  1. +3 −1 builtin/game/chatcommands.lua
@@ -836,11 +836,13 @@ core.register_chatcommand("days", {

core.register_chatcommand("shutdown", {
description = "Shutdown server",
params = "[reconnect] [message]",
privs = {server=true},
func = function(name, param)
core.log("action", name .. " shuts down server")
core.request_shutdown()
core.chat_send_all("*** Server shutting down (operator request).")
local reconnect, message = param:match("([^ ]+)(.*)")
core.request_shutdown(message:trim(), minetest.is_yes(reconnect))
end,
})

0 comments on commit 3d25914

Please sign in to comment.
You can’t perform that action at this time.