From 087fb00859c9ba5d498cd89f753bddf59b095d39 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 8 Jan 2023 22:24:40 +0100 Subject: [PATCH] [MIRROR] adminhelp logs are now sanitized correctly [MDB IGNORE] (#18600) * adminhelp logs are now sanitized correctly (#72501) ## About The Pull Request Properly sanitizes adminhelp replies to match the sanitization given to the initial adminhelp ![image](https://user-images.githubusercontent.com/41448081/210929570-e1d3c29b-93aa-4140-a52e-e15c4222c2e6.png) ## Why It's Good For The Game LogBuddy breaks if any admin replies to a message over multiple lines, so this fixes that ## Changelog :cl: admin: Logbuddy should no longer fail to parse logs with multi-line adminhelp replies /:cl: * adminhelp logs are now sanitized correctly Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> --- code/modules/admin/verbs/adminpm.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 3c30a14f4e6..78931c1ee7a 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -555,9 +555,9 @@ if(ambiguious_recipient == EXTERNAL_PM_USER) // Guard against the possibility of a null, since it'll runtime and spit out the contents of what should be a private ticket. if(ticket) - log_admin_private("PM: Ticket #[ticket_id]: [our_name]->External: [raw_message]") + log_admin_private("PM: Ticket #[ticket_id]: [our_name]->External: [sanitize_text(trim(raw_message))]") else - log_admin_private("PM: [our_name]->External: [raw_message]") + log_admin_private("PM: [our_name]->External: [sanitize_text(trim(raw_message))]") for(var/client/lad in GLOB.admins) to_chat(lad, type = MESSAGE_TYPE_ADMINPM, @@ -581,9 +581,9 @@ window_flash(recipient, ignorepref = TRUE) if(ticket) - log_admin_private("PM: Ticket #[ticket_id]: [our_name]->[recipient_name]: [raw_message]") + log_admin_private("PM: Ticket #[ticket_id]: [our_name]->[recipient_name]: [sanitize_text(trim(raw_message))]") else - log_admin_private("PM: [our_name]->[recipient_name]: [raw_message]") + log_admin_private("PM: [our_name]->[recipient_name]: [sanitize_text(trim(raw_message))]") //we don't use message_admins here because the sender/receiver might get it too for(var/client/lad in GLOB.admins) if(lad.key == key || lad.key == recipient_key) //check to make sure client/lad isn't the sender or recipient