From c92a741a8c32d6fcff49ca941ce083d60ec1d25f Mon Sep 17 00:00:00 2001 From: AnturK Date: Sun, 29 Oct 2017 17:27:37 +0100 Subject: [PATCH] No repeats --- code/modules/client/verbs/ooc.dm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index ef1e2511728..90861dd3d87 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -260,18 +260,18 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR) set desc ="Ignore a player's messages on the OOC channel" - var/list/ghosts = list() - if(isobserver(mob)) - for(var/mob/dead/observer/O in GLOB.dead_mob_list) - ghosts += O - var/choices = sortKey(GLOB.clients + ghosts) - + var/see_ghost_names = isobserver(mob) + var/list/choices = list() + for(var/client/C in GLOB.clients) + if(isobserver(C.mob) && see_ghost_names) + choices["[C.mob]([C])"] = C + else + choices["[C]"] = C + choices = sortList(choices) var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in choices - if(!selection) + if(!selection || !(selection in choices)) return - if(ismob(selection)) - var/mob/dead/observer/O = selection - selection = O.client + selection = choices[selection] if(selection == src) to_chat(src, "You can't ignore yourself.") return