Add ctf.chat_send_team

master
rubenwardy 2019-03-22 03:20:31 +00:00
parent 0f70e755d4
commit 93ba341695
1 changed files with 10 additions and 0 deletions

View File

@ -118,6 +118,16 @@ function ctf.player_or_nil(name)
return ctf.players[name]
end
function ctf.chat_send_team(team, msg)
if type(team) == "string" then
team = ctf.team(team)
end
for pname, _ in pairs(team.players) do
minetest.chat_send_player(pname, msg)
end
end
function ctf.remove_player(name)
ctf.log("team", "Removing player ".. dump(name))
local player = ctf.players[name]