From 509677e51da7c8c6a3ba636eab36e5a6703a4fdd Mon Sep 17 00:00:00 2001
From: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
Date: Sat, 14 Aug 2021 11:54:09 -0700
Subject: [PATCH] Fixes new ticket ahelp message double sanitizing (#60826)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
---
code/modules/admin/verbs/adminhelp.dm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 51bf810f96c..9c5217f33d1 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -186,12 +186,12 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
* Call this on its own to create a ticket, don't manually assign current_ticket
*
* Arguments:
- * * msg - The title of the ticket: usually the ahelp text
+ * * msg_raw - The first message of this admin_help: used for the initial title of the ticket
* * is_bwoink - Boolean operator, TRUE if this ticket was started by an admin PM
*/
-/datum/admin_help/New(msg, client/C, is_bwoink)
+/datum/admin_help/New(msg_raw, client/C, is_bwoink)
//clean the input msg
- msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
+ var/msg = sanitize(copytext_char(msg_raw, 1, MAX_MESSAGE_LEN))
if(!msg || !C || !C.mob)
qdel(src)
return
@@ -219,7 +219,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
AddInteraction("[key_name_admin(usr)] PM'd [LinkedReplyName()]")
message_admins("Ticket [TicketHref("#[id]")] created")
else
- MessageNoRecipient(msg)
+ MessageNoRecipient(msg_raw)
//send it to TGS if nobody is on and tell us how many were on
var/admin_number_present = send2tgs_adminless_only(initiator_ckey, "Ticket #[id]: [msg]")