diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2021-04-25 16:58:17 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2021-04-25 16:58:17 +0200 |
commit | 5c494aa7fad956eba28cba4e62a81c3b65fdf126 (patch) | |
tree | 4d6f34e880edb46275a049194f58fa9a0f252ba0 | |
parent | 8d28358c6772c927998139c1ffadbb2c1105d85d (diff) | |
download | xban2-5c494aa7fad956eba28cba4e62a81c3b65fdf126.tar.gz xban2-5c494aa7fad956eba28cba4e62a81c3b65fdf126.tar.bz2 xban2-5c494aa7fad956eba28cba4e62a81c3b65fdf126.zip |
Announce new players to moderators
-rw-r--r-- | init.lua | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -250,6 +250,17 @@ minetest.register_on_prejoinplayer(function(name, ip) end end) +minetest.register_on_newplayer(function(player) + local players = minetest.get_connected_players() + local pname = player:get_player_name() + for i=1,#players do + local name = players[i]:get_player_name() + if minetest.check_player_privs(name, {ban = true}) or minetest.check_player_privs(name, {kick = true}) then + minetest.chat_send_player(name, "*** xban: New player "..pname.." joined the game") + end + end +end) + minetest.register_on_joinplayer(function(player) local name = player:get_player_name() local e = xban.find_entry(name) |