24c267c3b8
* add leave message * Update mods/ctf/ctf_leave_message/init.lua Co-authored-by: David Leal <halfpacho@gmail.com> * Update mods/ctf/ctf_leave_message/init.lua Co-authored-by: David Leal <halfpacho@gmail.com> * Update mods/ctf/ctf_leave_message/mod.conf Co-authored-by: David Leal <halfpacho@gmail.com> * Update mods/ctf/ctf_leave_message/init.lua Co-authored-by: David Leal <halfpacho@gmail.com> * Update mods/ctf/ctf_leave_message/init.lua okay. Co-authored-by: David Leal <halfpacho@gmail.com> * Update mods/ctf/ctf_leave_message/init.lua Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com> Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com>
10 lines
358 B
Lua
10 lines
358 B
Lua
function minetest.send_leave_message(player_name, timed_out)
|
|
local player = ctf.player(player_name)
|
|
local tcolor = ctf_colors.get_color(player).css
|
|
|
|
local announcement = "*** " .. minetest.colorize(tcolor, player_name) .. " left the game."
|
|
if timed_out then
|
|
announcement = announcement .. " (timed out)"
|
|
end
|
|
minetest.chat_send_all(announcement)
|
|
end
|