Swear Filter???
Hi again everybody! So again, I am working on a better Microverse; and one issue I often noticed was that there was no swear filter. People sometimes would just straight out swear, and that is not appropriate. So, I was wondering if anyone has made a swear filter, and if not could someone make it??? If you make it I will give you credit. Thanks.
There is no such filter.
You must create it.
It's best to use a List structure.
Forbidden = new List() // Forbidden = []
addWords = function( words )
Forbidden[ words ] = "ban"
end
isForbidden = function( words )
if Forbidden[ words ] == "ban" then
return true
else
return false
end
end
w = "test"
addWords( w )
print( isForbidden( w ))
Of course you can make a class out of it.