Remove unused team ownership code; improve team listing (#512)

This commit is contained in:
MinetestSam 2019-11-25 13:05:45 +05:30 committed by ANAND
parent a8aa3f98c9
commit 1f10fd9e22
2 changed files with 11 additions and 84 deletions

View file

@ -237,24 +237,6 @@ function ctf.clean_player_lists()
end
end
-- Sees if the player can change stuff in a team
function ctf.can_mod(player,team)
local privs = minetest.get_player_privs(player)
if privs then
if privs.ctf_admin == true then
return true
end
end
if player and ctf.teams[team] and ctf.teams[team].players and ctf.teams[team].players[player] then
if ctf.teams[team].players[player].auth == true then
return true
end
end
return false
end
-- Automatic Allocation
function ctf.autoalloc(name, alloc_mode)
alloc_mode = alloc_mode or ctf.setting("allocate_mode")