archfan cdfb9b0a78 Fix: Prevent n00bs from joining (#25)
Deny access to bots/players with names ending in 3 numbers and starting with a capital
2018-12-14 13:23:40 -05:00

6 lines
266 B
Lua

minetest.register_on_prejoinplayer(function(name, ip)
if string.match(name, "[A-Z]%D+%d%d%d") ~= nil then
return "The format of your username is disallowed - please rejoin with a different username if your client supports it."
end
end)