summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua12
1 files changed, 12 insertions, 0 deletions
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)