Guest User

Untitled

a guest
Sep 6th, 2017
134
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local words = {
  3. "fuck", "faggot", "asshole", "arsehole", "dick", "cunt", "wtf",
  4. "retard", "bitch", "shit", "bastard", "nigger", "nigga",
  5. "raping", "penis", "vagina", "nipple", "titties", "penis", "boobs", "cock"
  6. }
  7.  
  8. minetest.register_on_chat_message(function(name, message)
  9.  
  10. if not message then
  11. return
  12. end
  13.  
  14. local msg = message:lower()
  15.  
  16. for n = 1, #words do
  17.  
  18. if msg:find( words[n] ) then
  19.  
  20. minetest.kick_player(name, "( ** WATCH YOUR LANGUAGE ** )")
  21. message = "-- kicked for swearing."
  22. minetest.chat_send_all("** " .. name .. " kicked for swearing.")
  23. return message
  24.  
  25. end
  26. end
  27. end)
RAW Paste Data