From 909f1ba244179dfcca6173213506163adadc4e83 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 30 Oct 2017 16:05:58 -0400 Subject: [PATCH] Merge pull request #32222 from AnturK/ignoreprovement Ignore verb now also shows ghost names --- code/modules/client/verbs/ooc.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index e2022729be..a0c1e2135a 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -259,9 +259,19 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR) set category = "OOC" set desc ="Ignore a player's messages on the OOC channel" - var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in sortKey(GLOB.clients) - if(!selection) + + 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 || !(selection in choices)) return + selection = choices[selection] if(selection == src) to_chat(src, "You can't ignore yourself.") return