From 6a34d2659961c00ab5f4f6a50788abebcf4e8b12 Mon Sep 17 00:00:00 2001 From: Wildkins Date: Sat, 17 Dec 2022 14:01:49 -0500 Subject: [PATCH] Stop deadminned staff from destroying the server (#15354) --- code/modules/client/client procs.dm | 4 ++-- code/modules/world_api/commands/server_query.dm | 4 ++-- html/changelogs/johnwildkins-fixboi.yml | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/johnwildkins-fixboi.yml diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 1b40d932768..a473947dbcf 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -471,7 +471,7 @@ var/list/localhost_addresses = list( ticket_panels -= src if(holder) holder.owner = null - staff -= src + staff -= src directory -= ckey clients -= src SSassets.handle_disconnect(src) @@ -824,4 +824,4 @@ var/list/localhost_addresses = list( return FALSE /obj/screen/click_catcher/is_auto_clickable() - return TRUE \ No newline at end of file + return TRUE diff --git a/code/modules/world_api/commands/server_query.dm b/code/modules/world_api/commands/server_query.dm index f8439397610..a797276396b 100644 --- a/code/modules/world_api/commands/server_query.dm +++ b/code/modules/world_api/commands/server_query.dm @@ -15,8 +15,8 @@ s["stationtime"] = worldtime2text() s["roundduration"] = get_round_duration_formatted() s["gameid"] = game_id - s["game_state"] = SSticker ? 0 : SSticker.current_state - s["transferring"] = !!(evacuation_controller.is_evacuating()) + s["game_state"] = SSticker ? SSticker.current_state : 0 + s["transferring"] = evacuation_controller?.is_evacuating() s["players"] = clients.len s["staff"] = staff.len diff --git a/html/changelogs/johnwildkins-fixboi.yml b/html/changelogs/johnwildkins-fixboi.yml new file mode 100644 index 00000000000..8b78436913b --- /dev/null +++ b/html/changelogs/johnwildkins-fixboi.yml @@ -0,0 +1,7 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Discord bot (and other things that interact with the staff list) no longer break when a de-admined staff member leaves the server." + - bugfix: "Fixed the bot runtiming the server by asking about the evacuation controller before it existed."