From 9db3ba0be0106d137662444f54c50516092c7b65 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 29 Sep 2017 10:30:17 -0400 Subject: [PATCH] Chat command to notify admins when the round ends --- code/controllers/subsystem/ticker.dm | 2 ++ code/modules/admin/chat_commands.dm | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index be5bedce6a4..05cde4b83c2 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -330,6 +330,8 @@ SUBSYSTEM_DEF(ticker) var/num_shuttle_escapees = 0 to_chat(world, "


The round has ended.") + if(LAZYLEN(GLOB.round_end_notifiees)) + send2irc("Notice", "[GLOB.round_end_notifiees.Join(", ")] the round has ended.") for(var/client/C in GLOB.clients) if(!C.credits) diff --git a/code/modules/admin/chat_commands.dm b/code/modules/admin/chat_commands.dm index e0d7f1315e8..4b2942a0f28 100644 --- a/code/modules/admin/chat_commands.dm +++ b/code/modules/admin/chat_commands.dm @@ -61,3 +61,17 @@ /datum/server_tools_command/adminwho/Run(sender, params) return ircadminwho() + +GLOBAL_LIST(round_end_notifiees) + +/datum/server_tools_command/notify + name = "notify" + help_text = "Pings the invoker when the round ends" + admin_only = TRUE + +/datum/server_tools_command/notify/Run(sender, params) + if(!SSticker.IsRoundInProgress() && SSticker.HasRoundStarted()) + return "[sender], the round has already ended!" + LAZYINITLIST(GLOB.round_end_notifiees) + GLOB.round_end_notifiees[sender] = TRUE + return "I will notify [sender] when the round ends." \ No newline at end of file