From d778b3a622fb86062e77a93e627b84272d2e2277 Mon Sep 17 00:00:00 2001 From: olliy <55839810+olliy1or@users.noreply.github.com> Date: Fri, 30 Apr 2021 01:23:37 +0500 Subject: [PATCH] Delete mods/other/disallowed_names directory --- mods/other/disallowed_names/init.lua | 56 ------------------------- mods/other/disallowed_names/license.txt | 7 ---- 2 files changed, 63 deletions(-) delete mode 100644 mods/other/disallowed_names/init.lua delete mode 100644 mods/other/disallowed_names/license.txt diff --git a/mods/other/disallowed_names/init.lua b/mods/other/disallowed_names/init.lua deleted file mode 100644 index f79d40a..0000000 --- a/mods/other/disallowed_names/init.lua +++ /dev/null @@ -1,56 +0,0 @@ -local storage = minetest.get_mod_storage() -minetest.deserialize(storage:get_string("disallowed_names")) -disallowed_names=minetest.deserialize(storage:get_string("disallowed_names")) or {"sex","fuck","damn","drug","suicid"} - -minetest.register_on_prejoinplayer(function(name) - for k,v in pairs(disallowed_names) do - if string.find(string.lower(name),string.lower(v)) then - return "Your cannot use that username in this server. Please login with another username." - end - end -end) - --- Command to add a name to disallowed names -minetest.register_chatcommand("bdname_add", { - params = "", - privs = {ban = true}, - description = "Adds a name to the disallowed names list.", - func = function(name,param) - if param ~= "" then - table.insert(disallowed_names,tostring(param)) - minetest.chat_send_player(name, "Added " .. param .. " to the list of banned words") - local serial_table = minetest.serialize(disallowed_names) - storage:set_string("disallowed_names", serial_table) - else - minetest.chat_send_player(name, "You need to add a name\n/bdname_add ") - end - end -}) - ---removes a name from disallowed names -minetest.register_chatcommand("bdname_remove",{ - description = "removes a name from disallowed names", - params = "", - privs = {ban=true}, - func = function(name, param) - if param ~="" then - for k in pairs(disallowed_names) do - if param == disallowed_names[k] then - table.remove(disallowed_names,k) - end - end - storage:set_string("disallowed_names", minetest.serialize(disallowed_names)) - end - end -}) - --- List of disallowed names -minetest.register_chatcommand("bdname_list", { - description = "Lists all the disallowed names.", - privs = {ban = true}, - func = function(name) - for k in pairs(disallowed_names) do - minetest.chat_send_player(name, disallowed_names[k]) - end - end -}) diff --git a/mods/other/disallowed_names/license.txt b/mods/other/disallowed_names/license.txt deleted file mode 100644 index 6b0a0fb..0000000 --- a/mods/other/disallowed_names/license.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2021 olliy - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.