OOC()
set hidden = 1
var/msg = input("What do you wish to say to the world?") as text
if(!msg&&length(msg)>250||findtext("[msg]","<"))
usr << "<B><font size = 1><font color = red>Error"
return
if(!msg&&length(msg)<1||findtext("[msg]","<"))
usr << "<B><font size = 1><font color = red>Error"
return
if(src.PlayerMute)
usr << "<B><font size = 1><font color = red>You have been muted."
return
for(var/mob/Characters/M in world)
if(!M.client){continue}
if(usr.Ignored.Find(M.ckey)){continue}
M <<"<b><font size = 1><font color = silver>(World Say)<font color = green> ([Rank]) <font color = blue>[usr]: <font color = white>[msg]"
mob/NPC/Ignorer
name = "(NPC) Ignorer"
icon = 'ignore.dmi'
NPC=1
HitPoints = 5
density = 1
Click()
switch(input("What would you like to do?","Ignore") in list("Ignore","Unignore"))
if("Ignore")
var/ilist[0]
for(var/mob/M in world)
if(M.client)
ilist += M
ilist += "Cancel"
var/mob/M = input("Who would you like to ignore?","Ignore") in ilist
if(M == "Cancel")
return
else
usr.Ignored.Add(M.ckey)
M << "[usr] has ignored you."
usr << "you ignored [M]"
if("Unignore")
if(!(usr.Ignored.len)){return}
var/Name= input("Un-ignore whom?","Un-Ignore","Cancel") in usr.Ignored
usr.Ignored.Remove(Name)
for(var/mob/M in world)
if(M.ckey==Name)
M << "[usr] has un-ignored you."
usr << "you have un-ignored [M]"
if I ignore myself i cant see my text but if i ignore someone else they can see my text...weird....help please
A mob's Ignored list contains the ckey of the people they are ignoring. When a player talks you're sending their message to eveyone who they aren't ignoring, you should be sending the message to everyone who isn't ignoring them.
On another note, you're first if() statement is not needed. "!msg&&length(msg)>250" will never return true because if there is no message it can't be longer than 250 characters, and the findtext() part is covered in the other if(). The second if() has it's problems too. I'm not quite sure why you are using && in here, but if my understanding of the order or preference is right it's only doing a needless calculation. if(!msg) will return true if msg is either null, 0, or "", so if the message is nothing it's just checking again right afterward (length(msg)<1).
If I understand correctly you're trying to return when any of these things occur:
1. A message contains "<" (if you're trying to block html, look up html_encode())
2. A message is completely empty
3. A message is larger than 250 characters
This would be a better if statement for that, as a matter of fact, it's your first one with the AND (&&) changed to OR (||). =)