mirror of
https://github.com/minetest-mods/irc.git
synced 2024-12-27 01:10:17 +01:00
Report when players time out instead of leaving normally. (#25)
This commit is contained in:
parent
f98282818d
commit
43493eb2ea
@ -10,10 +10,11 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player, timed_out)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if irc.connected and irc.config.send_join_part then
|
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
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user