Rename /vote_next to /vote

This commit is contained in:
rubenwardy 2015-12-01 18:18:29 +00:00
parent 6bde327624
commit a66745923c

View file

@ -6,11 +6,7 @@ function ctf_match.register_on_skip_map(func)
table.insert(ctf_match.registered_on_skip_map, func) table.insert(ctf_match.registered_on_skip_map, func)
end end
minetest.register_chatcommand("vote_next", { function ctf_match.vote_next(name, params)
privs = {
interact = true
},
func = function(name, param)
vote.new_vote(name, { vote.new_vote(name, {
description = "Skip to next match", description = "Skip to next match",
help = "/yes, /no or /abstain", help = "/yes, /no or /abstain",
@ -37,5 +33,18 @@ minetest.register_chatcommand("vote_next", {
self.description .. "'") self.description .. "'")
end end
}) })
end end
minetest.register_chatcommand("vote", {
privs = {
interact = true
},
func = ctf_match.vote_next
}) })
minetest.register_on_chat_message(function(name, msg)
if msg == "/vote_next" then
ctf_match.vote_next(name)
return true
end
end)