capturetheflag/mods/ctf/ctf_leave_message/init.lua

11 lines
386 B
Lua
Raw Normal View History

function minetest.send_leave_message(player_name, timed_out)
local player = ctf.player(player_name)
local tcolor = ctf_colors.get_color(player).css
2022-02-04 15:37:45 +00:00
local announcement = "*** " .. player_name .. " (team " .. minetest.colorize(tcolor, player.team) .. ") left the game."
if timed_out then
announcement = announcement .. " (timed out)"
end
minetest.chat_send_all(announcement)
end