minetest.request_shutdown

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.request_shutdown([message],[reconnect],[delay])

Description

Request for server shutdown.

  • message — displays to clients on shutdown.
  • reconnect == true — displays a reconnect button.
  • delay — adds an optional delay (in seconds) before shutdown. Negative delay cancels the current active shutdown. Zero delay triggers an immediate shutdown.

Example

minetest.register_chatcommand ("shutdown", {
	privs = {ban = true},
	params = "",
	description = "Shuts down server",
	func = function()
		minetest.request_shutdown("Server Shutdown requested", true, 10)
	end
})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox