Fixes new ticket ahelp message double sanitizing (#60826)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Wayland-Smithy
2021-08-14 11:54:09 -07:00
committed by GitHub
co-authored by Mothblocks
parent a4a803e578
commit 509677e51d
+4 -4
View File
@@ -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("<font color='blue'>[key_name_admin(usr)] PM'd [LinkedReplyName()]</font>")
message_admins("<font color='blue'>Ticket [TicketHref("#[id]")] created</font>")
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]")