1
0
mirror of https://github.com/minetest-mods/irc.git synced 2024-11-05 09:40:20 +01:00

Report when players time out instead of leaving normally. (#25)

This commit is contained in:
Diego Martínez 2016-06-19 23:20:20 -03:00 committed by GitHub
parent f98282818d
commit 43493eb2ea

View File

@ -10,10 +10,11 @@ minetest.register_on_joinplayer(function(player)
end)
minetest.register_on_leaveplayer(function(player)
minetest.register_on_leaveplayer(function(player, timed_out)
local name = player:get_player_name()
if irc.connected and irc.config.send_join_part then
irc:say("*** "..name.." left the game")
irc:say("*** "..name.." left the game"..
(timed_out and " (Timed out)" or ""))
end
end)