diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 4b52f03c1ec8..e464276e224e 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -470,7 +470,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(state != AHELP_ACTIVE) return - if(marked_admin != usr.key) + if(marked_admin && marked_admin != usr.ckey) to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!")) return @@ -489,7 +489,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(state != AHELP_ACTIVE) return - if(marked_admin != usr.key) + if(marked_admin && marked_admin != usr.ckey) to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!")) return @@ -511,7 +511,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(state != AHELP_ACTIVE || !initial_message) return - if(marked_admin != usr.key) + if(marked_admin && marked_admin != usr.ckey) to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!")) return @@ -539,7 +539,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /datum/admin_help/proc/mark_ticket() if(marked_admin) - if(marked_admin == usr.key) + if(marked_admin == usr.ckey) unmark_ticket() return to_chat(usr, SPAN_WARNING("This ticket has already been marked by [marked_admin].")) @@ -557,7 +557,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) message_admins(msg) log_admin_private(msg) log_ahelp(id, "Marked", "Marked by [usr.key]", sender = usr.ckey) - marked_admin = usr.key + marked_admin = usr.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 a9a3a90ff35a..fe3cf36e9a9e 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -228,7 +228,8 @@ if(CLIENT_IS_STAFF(src)) //sender is an admin but recipient is not. Do BIG RED TEXT var/already_logged = FALSE if(!recipient.current_ticket) - new /datum/admin_help(msg, recipient, TRUE) + var/datum/admin_help/new_ticket = new(msg, recipient, TRUE) + new_ticket.marked_admin = ckey already_logged = TRUE log_ahelp(recipient.current_ticket.id, "Ticket Opened", msg, recipient.ckey, src.ckey) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 0dc2a27594a7..44286b5fabe0 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -16,9 +16,6 @@ var/atom/movable/screen/hands = null //robot - var/adminhelp_marked = 0 // Prevents marking an Adminhelp more than once. Making this a client define will cause runtimes and break some Adminhelps - var/adminhelp_marked_admin = "" // Ckey of last marking admin - /// a ckey that persists client logout / ghosting, replaced when a client inhabits the mob var/persistent_ckey