1 local path
= minetest
.get_modpath(minetest
.get_current_modname())
5 dofile(path
.."/info.lua")
8 dofile(path
.."/gm.lua")
11 dofile(path
.."/time.lua")
14 dofile(path
.."/kits.lua")
17 dofile(path
.."/debug.lua")
19 -- By VanessaE, sfan5, and kaeza.
21 ["guest"] = "Guest accounts are disallowed on this server. "..
22 "Please choose a proper username and try again.",
23 ["^[0-9]+$"] = "All-numeric usernames are disallowed on this server. "..
24 "Please choose a proper username and try again.",
25 ["[0-9].-[0-9].-[0-9].-[0-9].-[0-9]"] = "Too many numbers in your username. "..
26 "Please try again with less than five digits in your username."
28 minetest
.register_on_prejoinplayer(function(name
, ip
)
29 local lname
= name
:lower()
30 for re
, reason
in pairs(disallowed
) do
31 if lname
:find(re
) then
37 return "Too short of a username. "..
38 "Please pick a name with at least two letters and try again."
42 return "Too long username. "..
43 "Please pick a name with no more 30 letters and try again."