mirror of
https://github.com/minetest-mods/irc.git
synced 2024-12-26 17:00: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)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user