Clarify licence to LGPL 2.1 or later.
This commit is contained in:
parent
fe32a28fe4
commit
905843f493
@ -5,11 +5,9 @@ License of source code:
|
|||||||
-----------------------
|
-----------------------
|
||||||
Andrey's mod for minetest game
|
Andrey's mod for minetest game
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This mod is Free and Open Source Software, released under the LGPL 2.1 or later.
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
|
||||||
Kick player out when curse word is said.
|
Kick player out when he type curse word in chat or using /me or /msg command.
|
||||||
|
Checks for some English and Russian curse words.
|
||||||
|
12
init.lua
12
init.lua
@ -1,7 +1,9 @@
|
|||||||
-- Minetest 0.4.10+ mod: chat_anticurse
|
-- Minetest 0.4.10+ mod: chat_anticurse
|
||||||
-- punish player for cursing by disconnecting them
|
-- punish player for cursing by disconnecting them
|
||||||
--
|
--
|
||||||
-- See README.txt for licensing and other information.
|
-- This mod is Free and Open Source Software, released under the LGPL 2.1 or later.
|
||||||
|
--
|
||||||
|
-- See README.txt for more information.
|
||||||
|
|
||||||
chat_anticurse = {}
|
chat_anticurse = {}
|
||||||
chat_anticurse.simplemask = {}
|
chat_anticurse.simplemask = {}
|
||||||
@ -48,7 +50,7 @@ chat_anticurse.check_message = function(name, message)
|
|||||||
local checkingmessage=string.lower( name.." "..message .." " )
|
local checkingmessage=string.lower( name.." "..message .." " )
|
||||||
local uncensored = 0
|
local uncensored = 0
|
||||||
for i=1, #chat_anticurse.simplemask do
|
for i=1, #chat_anticurse.simplemask do
|
||||||
if string.find(checkingmessage, chat_anticurse.simplemask[i], 1, plain) ~=nil then
|
if string.find(checkingmessage, chat_anticurse.simplemask[i], 1, true) ~=nil then
|
||||||
uncensored = 2
|
uncensored = 2
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@ -56,9 +58,9 @@ chat_anticurse.check_message = function(name, message)
|
|||||||
|
|
||||||
--additional checks
|
--additional checks
|
||||||
if
|
if
|
||||||
string.find(checkingmessage, " c"..x3.."" .. "m ", 1, plain) ~=nil and
|
string.find(checkingmessage, " c"..x3.."" .. "m ", 1, true) ~=nil and
|
||||||
not (string.find(checkingmessage, " c"..x3.."" .. "m " .. "se", 1, plain) ~=nil) and
|
not (string.find(checkingmessage, " c"..x3.."" .. "m " .. "se", 1, true) ~=nil) and
|
||||||
not (string.find(checkingmessage, " c"..x3.."" .. "m " .. "to", 1, plain) ~=nil)
|
not (string.find(checkingmessage, " c"..x3.."" .. "m " .. "to", 1, true) ~=nil)
|
||||||
then
|
then
|
||||||
uncensored = 2
|
uncensored = 2
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user