I've been looking for a mod that kicks players if they swear.
I couldn't find one, so I decided to make one :) not sure if screenshots
are necessary, but I'm working on them.
The code was originally from AiTechEye's misccmd
mod, but I thought that this particular module of it
needed a bit more attention. So here it is!
Add more (temporary):
Copy this code, paste it into the init.lua file and change the swear words listed in it.
Code: Select all
local badwords_kick_saying_F=1
minetest.register_on_chat_message(function(name, message)
if badwords_kick_saying_F~=1 then return false end
msg=message:lower()
if msg:find("fuck") or
msg:find("fukc")
then
minetest.kick_player(name, "Ey, you. Don't talk like that! It ain't allowed.")
minetest.chat_send_all(name .. " said a swear word that is not accepted by the server. S/he was kicked.")
print("badword: <".. name .."> " .. message)
else
return false
end
end)
DOWNLOADS:
Go to the Github page.
After installation, rename the file from
kickoncurse-master to kickoncurse.
Report an Issue?