From dac40af6eeeb7205d507046fd4d9ae06ae182095 Mon Sep 17 00:00:00 2001 From: Diego Martinez Date: Mon, 4 Jan 2016 22:49:11 -0300 Subject: Server: Add reason for leave to `on_leaveplayer` callbacks --- doc/lua_api.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index ea47d0044..d89b0bf7b 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1912,8 +1912,9 @@ Call these functions only at load time! * If it returns a string, the player is disconnected with that string as reason * `minetest.register_on_joinplayer(func(ObjectRef))` * Called when a player joins the game -* `minetest.register_on_leaveplayer(func(ObjectRef))` +* `minetest.register_on_leaveplayer(func(ObjectRef, timed_out))` * Called when a player leaves the game + * `timed_out`: True for timeout, false for other reasons. * `minetest.register_on_cheat(func(ObjectRef, cheat))` * Called when a player cheats * `cheat`: `{type=}`, where `` is one of: -- cgit v1.2.3