From fdc905bec8dd2dd7a1bc5b73bd28166f2382bb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sat, 2 Dec 2017 11:39:57 +0100 Subject: first commit --- init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..4523ae2 --- /dev/null +++ b/init.lua @@ -0,0 +1,12 @@ +busy_ban = {} +minetest.register_on_prejoinplayer(function(name, ip) + if minetest.player_exists(name) then + return + end + if name:match("%d%d%d") then + return "We don't allow players with 3 numbers in their name. Please choose another username" + end + if #minetest.get_connected_players() > 6 then + return "Too many players are online right now. Please rejoin at a less busy moment" + end +end) -- cgit v1.2.3