123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- if not minetest.global_exists("banned_names") then banned_names = {} end
- banned_names.modpath = minetest.get_modpath("banned_names")
- banned_names.all_numeric = function(pname)
- if string.find(pname, "^%d+$") then
- return true
- end
- return false
- end
- banned_names.guest_name = function(pname)
-
-
-
-
- if string.find(pname, "^[A-Z][a-z]+%d%d%d$") or
-
- string.find(pname, "[Gg][Uu][Ee][Ss][Tt]") then
- return true
- end
-
- return false
- end
- banned_names.reserved_name = function(pname)
- local lower = string.lower(pname)
-
-
- if lower == "server" then
- return true
- end
-
- if lower == "dummy" then
- return true
- end
-
- if string.find(pname, "666+") then
- return true
- end
- return false
- end
- if not banned_names.run_once then
- local c = "banned_names:core"
- local f = banned_names.modpath .. "/init.lua"
- reload.register_file(c, f, false)
-
- banned_names.run_once = true
- end
|