Add vote and vote_starter priv
This commit is contained in:
parent
f1e45f006c
commit
9a8935c389
2 changed files with 22 additions and 7 deletions
|
@ -42,13 +42,15 @@ end
|
|||
|
||||
minetest.register_chatcommand("vote", {
|
||||
privs = {
|
||||
interact = true
|
||||
interact = true,
|
||||
vote_starter = true
|
||||
},
|
||||
func = ctf_match.vote_next
|
||||
})
|
||||
|
||||
minetest.register_on_chat_message(function(name, msg)
|
||||
if msg == "/vote_next" then
|
||||
if msg == "/vote_next" and minetest.check_player_privs(name,
|
||||
{interact=true, vote_starter=true}) then
|
||||
local suc, msg = ctf_match.vote_next(name)
|
||||
if msg then
|
||||
minetest.chat_send_player(name, msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue