mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix crash that can be caused by the shutdown command. (#5292)
This commit is contained in:
parent
2d1fca51e9
commit
4d634ef675
@ -842,7 +842,8 @@ core.register_chatcommand("shutdown", {
|
|||||||
core.log("action", name .. " shuts down server")
|
core.log("action", name .. " shuts down server")
|
||||||
core.chat_send_all("*** Server shutting down (operator request).")
|
core.chat_send_all("*** Server shutting down (operator request).")
|
||||||
local reconnect, message = param:match("([^ ]+)(.*)")
|
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,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user