From 938b924a377512a02f79a9b340c33168e83ced72 Mon Sep 17 00:00:00 2001
From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com>
Date: Thu, 28 Jan 2021 11:12:27 +0000
Subject: [PATCH] yes
---
code/modules/admin/verbs/adminpm.dm | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 4856f5af32..ab0b0d933a 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -113,12 +113,6 @@
to_chat(src, "Error: Use the admin IRC/Discord channel, nerd.", confidential = TRUE)
return
- //clean the message if it's not sent by a high-rank admin
- if(!check_rights(R_SERVER|R_DEBUG,0)||external)//no sending html to the poor bots
- msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
- if(!msg)
- return
-
else
//get message text, limit it's length.and clean/escape html
if(!msg)
@@ -133,11 +127,16 @@
else
if(holder)
to_chat(src, "Error: Admin-PM: Client not found.", confidential = TRUE)
- to_chat(src, "Message not sent:
[msg]", confidential = TRUE)
+ to_chat(src, "Message not sent:
[sanitize(msg)]", confidential = TRUE)
if(recipient_ticket)
recipient_ticket.AddInteraction("No client found, message not sent:
[msg]")
return
else
+ //clean the message if it's not sent by a high-rank admin
+ if(!check_rights(R_SERVER|R_DEBUG,0)||external)//no sending html to the poor bots
+ msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
+ if(!msg)
+ return
current_ticket.MessageNoRecipient(msg)
return
@@ -149,6 +148,12 @@
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
+ //clean the message if it's not sent by a high-rank admin
+ if(!check_rights(R_SERVER|R_DEBUG,0)||external)//no sending html to the poor bots
+ msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
+ if(!msg)
+ return
+
var/rawmsg = msg
if(holder)