Add /ctf_unqueue_restart
This commit is contained in:
parent
36e76e7924
commit
2e895b8592
1 changed files with 12 additions and 1 deletions
|
@ -40,7 +40,7 @@ minetest.register_chatcommand("ctf_respawn", {
|
||||||
local restart_on_next_match = false
|
local restart_on_next_match = false
|
||||||
local restart_on_next_match_by = nil
|
local restart_on_next_match_by = nil
|
||||||
minetest.register_chatcommand("ctf_queue_restart", {
|
minetest.register_chatcommand("ctf_queue_restart", {
|
||||||
description = "Respawn a player (clean inv, send to base)",
|
description = "Queue server restart",
|
||||||
privs = {
|
privs = {
|
||||||
server = true
|
server = true
|
||||||
},
|
},
|
||||||
|
@ -51,6 +51,17 @@ minetest.register_chatcommand("ctf_queue_restart", {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_chatcommand("ctf_unqueue_restart", {
|
||||||
|
description = "Unqueue server restart",
|
||||||
|
privs = {
|
||||||
|
server = true
|
||||||
|
},
|
||||||
|
func = function(name, param)
|
||||||
|
restart_on_next_match = false
|
||||||
|
return true, "Restart cancelled."
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
ctf_match.register_on_new_match(function()
|
ctf_match.register_on_new_match(function()
|
||||||
if restart_on_next_match then
|
if restart_on_next_match then
|
||||||
minetest.chat_send_player(restart_on_next_match_by, "Shutting down now!")
|
minetest.chat_send_player(restart_on_next_match_by, "Shutting down now!")
|
||||||
|
|
Loading…
Reference in a new issue