From 9284bdd2059f0f3cba854af73d1ebab55b2b0078 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 17 Sep 2017 22:25:43 -0500 Subject: [PATCH] [MIRROR] Admins in chat are notified if an ahelp is answered in game (#2828) * Admins in chat are notified if an ahelp is answered in game (#30638) * Admins in chat are notified if an ahelp is answered in game * Further sanity * Admins in chat are notified if an ahelp is answered in game --- code/modules/admin/verbs/adminhelp.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index b444c62219..4349bb307a 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -106,8 +106,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /datum/admin_help_tickets/proc/ClientLogin(client/C) C.current_ticket = CKey2ActiveTicket(C.ckey) if(C.current_ticket) - C.current_ticket.AddInteraction("Client reconnected.") C.current_ticket.initiator = C + C.current_ticket.AddInteraction("Client reconnected.") //Dissasociate ticket /datum/admin_help_tickets/proc/ClientLogout(client/C) @@ -152,6 +152,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) var/client/initiator //semi-misnomer, it's the person who ahelped/was bwoinked var/initiator_ckey var/initiator_key_name + var/heard_by_no_admins = FALSE var/list/_interactions //use AddInteraction() or, preferably, admin_ticket_log() @@ -199,6 +200,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) log_admin_private("Ticket #[id]: [key_name(initiator)]: [name] - heard by [admin_number_present] non-AFK admins who have +BAN.") if(admin_number_present <= 0) to_chat(C, "No active admins are online, your adminhelp was sent to the admin irc.") + heard_by_no_admins = TRUE GLOB.ahelp_tickets.active_tickets += src @@ -209,6 +211,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) return ..() /datum/admin_help/proc/AddInteraction(formatted_message) + if(heard_by_no_admins && usr && usr.client != initiator) + heard_by_no_admins = FALSE + send2irc(initiator_ckey, "Ticket #[id]: Answered by [key_name(usr)]") _interactions += "[gameTimestamp()]: [formatted_message]" //Removes the ahelp verb and returns it after 2 minutes