var/list/BannedWords = list("<font","<b")//etc, all the word to bann >_<
mob/Player/proc
CheckSpam(msg as text)
if(length(msg)>=101)
var/M=copytext(msg,1,100)
msg=M // i also tried msg=copytext(msg,1,100)
for(var/A in BannedWords)
if(findtext(msg,A,1)==1)
alert("Dont use HTML")
return 0
else
return 1
mob/Player
verb
say(msg as text)
set hidden=1
if(CheckSpam(msg)==0)
return
world<<"[usr:nombre]: [msg]"
Problem description: well... im trying to make an spam-check system for the messages and i dont want users to use html or to write a too long message, the html one works fine, if i write the html tag at the start of the message (like
"Hi"// THIS IS BANNED) but it doesnt work if i write it later (like
"Hi! this is red and your anti-spam system wont stop me" // THIS ISNT O_o:P )
and the text lenght code just doesn't work, i can write thousands of lines and nothing...
so id like someone to help me a little...
oh and english isn't my main language so sorry if i say something without sense...
) but it doesnt work if i write it later (like :P )
oh and english isn't my main language so sorry if i say something without sense...