projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0ce27e
)
Add support for the new arguments of `request_shutdown` to the `/shutdown` chatcomman...
author
red-001
<red-001@outlook.ie>
Sat, 18 Feb 2017 11:16:11 +0000
(11:16 +0000)
committer
Loïc Blot
<nerzhul@users.noreply.github.com>
Sat, 18 Feb 2017 11:16:11 +0000
(12:16 +0100)
builtin/game/chatcommands.lua
patch
|
blob
|
history
diff --git
a/builtin/game/chatcommands.lua
b/builtin/game/chatcommands.lua
index 08dc1bb1d11053189507a926871dbb8e8460e279..54cd6c3252cd7a8175bd9903182986af60dbedd1 100644
(file)
--- a/
builtin/game/chatcommands.lua
+++ b/
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,
})