mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Adds additional DB logging for admin help interactions (#62994)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -102,8 +102,7 @@
|
||||
if(logged)
|
||||
log_admin_private(pm)
|
||||
message_admins("[header]:<br>[text]")
|
||||
admin_ticket_log(target_ckey, "<font color='blue'>[header]</font>")
|
||||
admin_ticket_log(target_ckey, text)
|
||||
admin_ticket_log(target_ckey, "<font color='blue'>[header]</font><br>[text]")
|
||||
if(browse)
|
||||
browse_messages("[type]")
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
//
|
||||
|
||||
@@ -235,13 +235,13 @@
|
||||
confidential = TRUE)
|
||||
//omg this is dumb, just fill in both their tickets
|
||||
var/interaction_message = "<font color='purple'>PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]</font>"
|
||||
admin_ticket_log(src, interaction_message)
|
||||
admin_ticket_log(src, interaction_message, log_in_blackbox = FALSE)
|
||||
if(recipient != src) //reeee
|
||||
admin_ticket_log(recipient, interaction_message)
|
||||
admin_ticket_log(recipient, interaction_message, log_in_blackbox = FALSE)
|
||||
SSblackbox.LogAhelp(current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
|
||||
else //recipient is an admin but sender is not
|
||||
var/replymsg = "Reply PM from-<b>[key_name(src, recipient, 1)]</b>: <span class='linkify'>[keywordparsedmsg]</span>"
|
||||
admin_ticket_log(src, "<font color='red'>[replymsg]</font>")
|
||||
admin_ticket_log(src, "<font color='red'>[replymsg]</font>", log_in_blackbox = FALSE)
|
||||
to_chat(recipient,
|
||||
type = MESSAGE_TYPE_ADMINPM,
|
||||
html = span_danger("[replymsg]"),
|
||||
@@ -280,7 +280,7 @@
|
||||
html = span_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: <span class='linkify'>[msg]</span>"),
|
||||
confidential = TRUE)
|
||||
|
||||
admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>")
|
||||
admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>", log_in_blackbox = FALSE)
|
||||
|
||||
if(!already_logged) //Reply to an existing ticket
|
||||
SSblackbox.LogAhelp(recipient.current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
|
||||
@@ -410,7 +410,7 @@
|
||||
html = span_adminsay("<i>Click on the administrator's name to reply.</i>"),
|
||||
confidential = TRUE)
|
||||
|
||||
admin_ticket_log(C, "<font color='purple'>PM From [tgs_tagged]: [msg]</font>")
|
||||
admin_ticket_log(C, "<font color='purple'>PM From [tgs_tagged]: [msg]</font>", log_in_blackbox = FALSE)
|
||||
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
|
||||
Reference in New Issue
Block a user