summaryrefslogtreecommitdiff
path: root/builtin/game/misc.lua
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-15 23:19:18 +0200
committerGitHub <noreply@github.com>2017-04-15 23:19:18 +0200
commit34d32ce55ae4f3f29d7b645075dc8efacb2c96d2 (patch)
tree6e21a37780352412b853fd242b6177eff2afd0fd /builtin/game/misc.lua
parent0f955bf7fa7a1376acdbc06a617c0f15f9fad467 (diff)
downloadminetest-34d32ce55ae4f3f29d7b645075dc8efacb2c96d2.tar.gz
minetest-34d32ce55ae4f3f29d7b645075dc8efacb2c96d2.tar.bz2
minetest-34d32ce55ae4f3f29d7b645075dc8efacb2c96d2.zip
Implement delayed server shutdown with cancelation (#4664)
Diffstat (limited to 'builtin/game/misc.lua')
-rw-r--r--builtin/game/misc.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua
index 618d4d97f..a3eb26ac2 100644
--- a/builtin/game/misc.lua
+++ b/builtin/game/misc.lua
@@ -173,3 +173,8 @@ end
function core.close_formspec(player_name, formname)
return minetest.show_formspec(player_name, formname, "")
end
+
+function core.cancel_shutdown_requests()
+ core.request_shutdown("", false, -1)
+end
+