feat(mod): first join & server login msgs
This commit is contained in:
parent
36a8791364
commit
f530c72014
3
init.lua
3
init.lua
|
@ -122,6 +122,7 @@ function MatrixChat:login()
|
||||||
self.userid = data.user_id
|
self.userid = data.user_id
|
||||||
MatrixChat:sync()
|
MatrixChat:sync()
|
||||||
minetest.log("action", "Matrix authenticated")
|
minetest.log("action", "Matrix authenticated")
|
||||||
|
MatrixChat:send("*** Server connected to the matrix")
|
||||||
else
|
else
|
||||||
minetest.log("error", "Matrix login failed")
|
minetest.log("error", "Matrix login failed")
|
||||||
end
|
end
|
||||||
|
@ -252,7 +253,7 @@ end)
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
MatrixChat:send("*** "..name.." joined the game")
|
MatrixChat:send("*** "..name.." joined the game"..(last_login == nil and " for the first time" or ""))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player, timed_out)
|
minetest.register_on_leaveplayer(function(player, timed_out)
|
||||||
|
|
Loading…
Reference in New Issue