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:
2d1fca5
)
Fix crash that can be caused by the shutdown command. (#5292)
author
red-001
<red-001@outlook.ie>
Sat, 25 Feb 2017 08:28:25 +0000
(08:28 +0000)
committer
Loïc Blot
<nerzhul@users.noreply.github.com>
Sat, 25 Feb 2017 08:28:25 +0000
(09:28 +0100)
builtin/game/chatcommands.lua
patch
|
blob
|
history
diff --git
a/builtin/game/chatcommands.lua
b/builtin/game/chatcommands.lua
index 54cd6c3252cd7a8175bd9903182986af60dbedd1..5d59559728c6c672e925c7cf2b0d49b12eb7c99f 100644
(file)
--- a/
builtin/game/chatcommands.lua
+++ b/
builtin/game/chatcommands.lua
@@
-842,7
+842,8
@@
core.register_chatcommand("shutdown", {
core.log("action", name .. " shuts down server")
core.chat_send_all("*** Server shutting down (operator request).")
local reconnect, message = param:match("([^ ]+)(.*)")
- core.request_shutdown(message:trim(), minetest.is_yes(reconnect))
+ message = message or ""
+ core.request_shutdown(message:trim(), core.is_yes(reconnect))
end,
})