var/list/html = list("<",">","font","size","nigger","nigga","http","\\","www.","byond:\\")
mob/var
spam=0
mob/proc
Spam(T as text, var/list/S)
for(var/O in S)
if(findtext(T,S))
src<<"SPAMMAH!"
// src.spam=1
mob/verb/OOC(T as text)
set category = "Commands"
set desc = "Send a message to the world"
if(src.muted == 1 && ismuted==1)
src <<"You are muted"
if(length(T) >= 300)
alert("Message is too long")
else
src.Spam(T, html)
if(src.spam==0)
world << "[usr.organization_name_html]<font color = blue>{[usr.Village]}<font color = red>[usr.name]OOC:<font color = white> [T]"
else
src.spam=0
Problem description:Basicly, it doesn't work. If I activate the src.spam=1 it simply doesn't show a message.
PS:What is the difference in using usr and src in this case ? =S
Next: This is not how you'd do this. If you want to know if a message is spam, your Spam() proc should RETURN a value to let you know. IE: return 1 if it's spam, return 0 if it's not. Then, you'd do this:
Anyway, for your problem: you're calling findtext(T,S), but S is a list, not an element in the list.