mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
[MIRROR] Adds additional DB logging for admin help interactions [MDB IGNORE] (#9627)
* Adds additional DB logging for admin help interactions * fixed conflicts Co-authored-by: Nick <nick@nfreader.net> Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
This commit is contained in:
@@ -103,8 +103,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
|
||||
|
||||
@@ -724,8 +724,11 @@ 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) // SKYRAT EDIT ORIGINAL
|
||||
/proc/admin_ticket_log(what, message, admin_only = TRUE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
|
||||
//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) // SKYRAT EDIT ORIGINAL
|
||||
/proc/admin_ticket_log(what, message, log_in_blackbox = TRUE, admin_only = TRUE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
var/client/C
|
||||
var/mob/Mob = what
|
||||
if(istype(Mob))
|
||||
@@ -738,6 +741,8 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
|
||||
if(!admin_only)
|
||||
C.current_ticket.AddInteractionPlayer(message)
|
||||
// SKYRAT EDIT ADDITION END
|
||||
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)
|
||||
@@ -747,6 +752,8 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
|
||||
if(!admin_only)
|
||||
AH.AddInteractionPlayer(message)
|
||||
// SKYRAT EDIT ADDITION END
|
||||
if(log_in_blackbox)
|
||||
SSblackbox.LogAhelp(AH.id, "Interaction", message, what, usr.ckey)
|
||||
return AH
|
||||
|
||||
//
|
||||
|
||||
@@ -236,16 +236,16 @@
|
||||
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) // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(src, interaction_message, FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
// admin_ticket_log(src, interaction_message, log_in_blackbox = FALSE) // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(src, interaction_message, log_in_blackbox = FALSE, admin_only = FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
if(recipient != src)//reeee
|
||||
// admin_ticket_log(recipient, interaction_message) // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(recipient, interaction_message, FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
// admin_ticket_log(recipient, interaction_message, log_in_blackbox = FALSE) // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(recipient, interaction_message, log_in_blackbox = FALSE, admin_only = FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
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>") // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(src, "<font color='red'>[replymsg]</font>", FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
// admin_ticket_log(src, "<font color='red'>[replymsg]</font>", log_in_blackbox = FALSE) // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(src, "<font color='red'>[replymsg]</font>", log_in_blackbox = FALSE, admin_only = FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
to_chat(recipient,
|
||||
type = MESSAGE_TYPE_ADMINPM,
|
||||
html = span_danger("[replymsg]"),
|
||||
@@ -296,8 +296,8 @@
|
||||
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>") // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src, FALSE)]: [keywordparsedmsg]</font>", FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
// admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>", log_in_blackbox = FALSE) // SKYRAT EDIT ORIGINAL
|
||||
admin_ticket_log(recipient, "<font color='purple'>PM From [key_name_admin(src, FALSE)]: [keywordparsedmsg]</font>", log_in_blackbox = FALSE, admin_only = FALSE) // SKYRAT EDIT CHANGE -- Player ticket viewing
|
||||
|
||||
if(!already_logged) //Reply to an existing ticket
|
||||
SSblackbox.LogAhelp(recipient.current_ticket.id, "Reply", msg, recipient.ckey, src.ckey)
|
||||
@@ -427,7 +427,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