client
var/list/ignore
verb
Ignore(_ckey as text)
if(_ckey)
if(!src.ignore) src.ignore = list()
src.ignore += _ckey
src << "<b style=\"color:black\">You are now ignoring [_ckey].</b>"
else if(src.ignore && src.ignore.len)
if(src.ignore.len == 1) src << "<b style=\"color:black\">You are currently ignoring [src.ignore.len] person:</b>"
else src << "<b style=\"color:black\">You are currently ignoring [src.ignore.len] people:</b>"
for(var/ignored in src.ignore) src << "- [ignored]"
else src << "This verb uses the following format:\n\\ignore \"\[troll name\]\""
Unignore()
if(!src.ignore || !src.ignore.len)
src << "You aren't currently ignoring anyone."
return 0
var/extroll = input(src,"Who would you like to unignore?","Unignore") as null | anything in src.ignore
if(extroll)
src.ignore -= extroll
if(!src.ignore.len) src.ignore = null
src << "You've unignored [extroll]."
mob
verb
say(t as text)
for(var/mob/M in world)
if(!M.client||src in client.ignore)continue
else
world<<"[src] says: [t]"
Now this is not ignoring, People can still s how their text. When a player adds someone they talk once and it shows their message two times. How can I fix this in Say()?
Please note the Ignore/Unignore was programmed by wizkidd0123
~>Jiskuha
'in' has a low order of operation and therefor !client||src gets evaluated first. That evaluates to 1 (since src is going to be true) and makes that if statement equivalent to if(1 in client.ignore), which is always false and thus never executes.
If you are talking, and the person you are talking to doesn't want to hear you, that means you check M.client.ignore since M is the one recieving the message. Checking your own client.ignore would be like ignoring yourself.