diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index ce02cdb59e20..84298faaa3a1 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -543,27 +543,28 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) log_ahelp(id, "Defer", "Deferred to mentors by [usr.key]", null, usr.ckey) Close(silent = TRUE) -/datum/admin_help/proc/mark_ticket() +/datum/admin_help/proc/mark_ticket(mob/marking_admin) + var/mob/user = marking_admin || usr if(marked_admin) - if(marked_admin == usr.ckey) + if(marked_admin == user.ckey) unmark_ticket() return - to_chat(usr, SPAN_WARNING("This ticket has already been marked by [marked_admin].")) - var/unmark_option = tgui_alert(usr, "This message has been marked by [marked_admin]. Do you want to override?", "Marked Ticket", list("Overwrite Mark", "Unmark", "Cancel")) + to_chat(user, SPAN_WARNING("This ticket has already been marked by [marked_admin].")) + var/unmark_option = tgui_alert(user, "This message has been marked by [marked_admin]. Do you want to override?", "Marked Ticket", list("Overwrite Mark", "Unmark", "Cancel")) if(unmark_option == "Unmark") unmark_ticket() return if(unmark_option != "Overwrite Mark") return - var/key_name = key_name_admin(usr) + var/key_name = key_name_admin(user) AddInteraction("Marked by [key_name].", player_message = "Ticket marked!") to_chat(initiator, SPAN_ADMINHELP("An admin is preparing to respond to your ticket.")) var/msg = "Ticket [TicketHref("#[id]")] marked by [key_name]." message_admins(msg) log_admin_private(msg) - log_ahelp(id, "Marked", "Marked by [usr.key]", sender = usr.ckey) - marked_admin = usr.ckey + log_ahelp(id, "Marked", "Marked by [user.key]", sender = user.ckey) + marked_admin = user.ckey /datum/admin_help/proc/unmark_ticket() var/key_name = key_name_admin(usr) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 76525b2cae96..a6cf0f02a3de 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -60,6 +60,9 @@ var/message_prompt = "Message:" + if(AH && !AH.marked_admin) + AH.mark_ticket() + if((AH?.opening_responders && length(AH.ticket_interactions) == 1 ) || ((AH?.marked_admin && AH?.marked_admin != usr.ckey) && length(AH.ticket_interactions) == 2)) SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg', volume=30)) message_prompt += "\n\n**This ticket is already being responded to by: [length(AH.opening_responders) ? english_list(AH.opening_responders) : AH.marked_admin]**"