From 727b58f356327d64576e25f541d48be4145590f7 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 29 Aug 2024 17:09:58 +0100 Subject: [PATCH 1/4] yay --- code/modules/admin/admin_verbs.dm | 3 ++- code/modules/admin/tabs/event_tab.dm | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 2270685c0cf6..7fe5a1579b07 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -142,7 +142,8 @@ GLOBAL_LIST_INIT(admin_verbs_minor_event, list( /client/proc/toggle_hardcore_perma, /client/proc/toggle_bypass_joe_restriction, /client/proc/toggle_joe_respawns, - /datum/admins/proc/open_shuttlepanel + /datum/admins/proc/open_shuttlepanel, + /client/proc/get_whitelisted_clients, )) GLOBAL_LIST_INIT(admin_verbs_major_event, list( diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index fa0f43780031..f6175c5e72cc 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -42,6 +42,18 @@ CEI.handle_event_info_update(faction) +/client/proc/get_whitelisted_clients() + set name = "Find Whitelisted Players" + set category = "Admin.Events" + + var/flag = tgui_input_list(src, "Which flag?", "Whitelist Flags", GLOB.bitfields["whitelist_status"]) + + var/list/ckeys = list() + for(var/client/test_client in GLOB.clients) + if(test_client.check_whitelist_status(GLOB.bitfields["whitelist_status"][flag])) + ckeys += test_client.ckey + to_chat(src, SPAN_NOTICE("Whitelist holders: [ckeys.Join(", ")].")) + /client/proc/change_security_level() if(!check_rights(R_ADMIN)) return From ca0411850b588746d1f0b63a53c6f83fd8eaa1dc Mon Sep 17 00:00:00 2001 From: forest2001 <41653574+realforest2001@users.noreply.github.com> Date: Wed, 4 Sep 2024 02:46:21 +0100 Subject: [PATCH 2/4] Update code/modules/admin/tabs/event_tab.dm Co-authored-by: kiVts <48099872+kiVts@users.noreply.github.com> --- code/modules/admin/tabs/event_tab.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index f6175c5e72cc..0b9749dd4c9e 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -52,6 +52,9 @@ for(var/client/test_client in GLOB.clients) if(test_client.check_whitelist_status(GLOB.bitfields["whitelist_status"][flag])) ckeys += test_client.ckey + if(!length(ckeys)) + to_chat(src, SPAN_NOTICE("There are no players with that whitelist online")) + return to_chat(src, SPAN_NOTICE("Whitelist holders: [ckeys.Join(", ")].")) /client/proc/change_security_level() From 104361906108924c6939334f7198352cb206a442 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Tue, 3 Sep 2024 22:00:25 -0400 Subject: [PATCH 3/4] Update code/modules/admin/tabs/event_tab.dm --- code/modules/admin/tabs/event_tab.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 0b9749dd4c9e..bf644878eae9 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -45,7 +45,10 @@ /client/proc/get_whitelisted_clients() set name = "Find Whitelisted Players" set category = "Admin.Events" - + if(!admin_holder) + to_chat(usr, "Only administrators may use this command.") + return + var/flag = tgui_input_list(src, "Which flag?", "Whitelist Flags", GLOB.bitfields["whitelist_status"]) var/list/ckeys = list() From 909bdcbeda5a887e4fa5dee632605cce57b43de5 Mon Sep 17 00:00:00 2001 From: kiVts <48099872+kiVts@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:59:14 -0400 Subject: [PATCH 4/4] Update code/modules/admin/tabs/event_tab.dm --- code/modules/admin/tabs/event_tab.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index bf644878eae9..332f7185fd57 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -46,7 +46,6 @@ set name = "Find Whitelisted Players" set category = "Admin.Events" if(!admin_holder) - to_chat(usr, "Only administrators may use this command.") return var/flag = tgui_input_list(src, "Which flag?", "Whitelist Flags", GLOB.bitfields["whitelist_status"])