From 989b94df7103479ce7ca734199ec2c174c507761 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Mon, 2 Mar 2015 21:46:38 +0100 Subject: [PATCH] Added forbidden names list --- mods/name_restrictions/init.lua | 13 ++++++ worlds/minetestforfun/forbidden_names.txt | 48 +++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 worlds/minetestforfun/forbidden_names.txt diff --git a/mods/name_restrictions/init.lua b/mods/name_restrictions/init.lua index 64d8538f..0dcadd0d 100755 --- a/mods/name_restrictions/init.lua +++ b/mods/name_restrictions/init.lua @@ -17,6 +17,16 @@ temp = nil exemptions[minetest.setting_get("name")] = true exemptions["singleplayer"] = true +local disallowed_names = {} +local file = io.open(minetest.get_worldpath("name_restrictions") .. "/forbidden_names.txt", "r") +if file then + for line in file:lines() do + local low_line = line:lower() + disallowed_names[low_line] = true + end + file:close() +end + --------------------- -- Simple matching -- --------------------- @@ -41,6 +51,9 @@ minetest.register_on_prejoinplayer(function(name, ip) return reason end end + if disallowed_names[lname] then + return "Sorry. This name is forbidden." + end end) diff --git a/worlds/minetestforfun/forbidden_names.txt b/worlds/minetestforfun/forbidden_names.txt new file mode 100644 index 00000000..f07795ea --- /dev/null +++ b/worlds/minetestforfun/forbidden_names.txt @@ -0,0 +1,48 @@ +Siphano +AyPierre +Fukano +ThomasFukano +Azenet +ZeratoR +Skyyart +Xari +MrBboy45 +Jiraya +Dark +Funeral +Daweed +MrDaweed +thoyy +crafthoyy +Tado +Foxseen +Shorty +Aurelien +AurelienSama +Aurelien_sama +Roi_Louis +Talisker +FlamingTalisker +Kid +R3lient +Epee +EpeeForte +jaidev +Souls +SoulsStealer +SoulsStealerGames +Zephirr +MinecraftZephirr +Popi +October +Aishy +AishyZz +Eddytor +Tagazok +bxakid +darkbxakid +M5 +Mcuuber5 +Bardin +Elspawn +Bytell