Adds additional DB logging for admin help interactions (#62994)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Nick
2021-11-22 14:53:08 -08:00
committed by GitHub
co-authored by Mothblocks
parent 1f896a3a15
commit 2b411035c4
3 changed files with 13 additions and 8 deletions
+7 -1
View File
@@ -667,7 +667,9 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
//Use this proc when an admin takes action that may be related to an open ticket on what
//what can be a client, ckey, or mob
/proc/admin_ticket_log(what, message)
//log_in_blackbox: Whether or not this message with the blackbox system.
//If disabled, this message should be logged with a different proc call
/proc/admin_ticket_log(what, message, log_in_blackbox = TRUE)
var/client/C
var/mob/Mob = what
if(istype(Mob))
@@ -676,11 +678,15 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
C = what
if(istype(C) && C.current_ticket)
C.current_ticket.AddInteraction(message)
if(log_in_blackbox)
SSblackbox.LogAhelp(C.current_ticket.id, "Interaction", message, C.ckey, usr.ckey)
return C.current_ticket
if(istext(what)) //ckey
var/datum/admin_help/AH = GLOB.ahelp_tickets.CKey2ActiveTicket(what)
if(AH)
AH.AddInteraction(message)
if(log_in_blackbox)
SSblackbox.LogAhelp(AH.id, "Interaction", message, what, usr.ckey)
return AH
//