a = ‘this is a text from a spammer…WW…W. M–MO tank c.o…–m’
a = a:lower()
a = a.gsub(a, ‘[%p%s]’ , ‘’)
www_start,b = a.find(a, ‘www’)
com_start,b = a.find(a, ‘com’)
if www_start ~= nil and com_start ~= nil then
a = ‘***’
io.write(a)
else
io.write(a)
end
You could actually gather the sites (the part between www and com) and added to blacklist and if many users are adding this to blacklist autoban spammer.
You could actually target certain domain names and apply Levenshtein distance (https://gist.github.com/Badgerati/3261142)
to know if its some variacion of this sites name, i dont think the gold sellers are gonna change their sites URL just because of you.
