diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index c34c018d59c..e3c500ab6d0 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -115,7 +115,7 @@ var/message = "CROSS-SECTOR MESSAGE (INCOMING): [input["sender_ckey"]] (from [input["source"]]) is about to send \ the following message (will autoapprove in [soft_filter_passed ? "[extended_time_display]" : "[normal_time_display]"]): \ REJECT

\ - [html_encode(input["message"])]" + [input["message"]]" if(soft_filter_passed) message += "

NOTE: This message passed the soft filter on the origin server! The time was automatically expanded to [extended_time_display]." diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 6ad2833a378..ee46d9e8be0 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -321,7 +321,7 @@ if (!COOLDOWN_FINISHED(src, important_action_cooldown)) return - var/message = trim(params["message"], MAX_MESSAGE_LEN) + var/message = trim(html_encode(params["message"]), MAX_MESSAGE_LEN) if (!message) return @@ -335,13 +335,16 @@ if(soft_filter_result) if(tgui_alert(user,"Your message contains \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". \"[soft_filter_result[CHAT_FILTER_INDEX_REASON]]\", Are you sure you want to use it?", "Soft Blocked Word", list("Yes", "No")) != "Yes") return - message_admins("[ADMIN_LOOKUPFLW(user)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[html_encode(message)]\"") + message_admins("[ADMIN_LOOKUPFLW(user)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[message]\"") log_admin_private("[key_name(user)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". They may be using a disallowed term for a cross-station message. Increasing delay time to reject.\n\n Message: \"[message]\"") GLOB.communications_controller.soft_filtering = TRUE playsound(src, 'sound/machines/terminal/terminal_prompt_confirm.ogg', 50, FALSE) var/destination = params["destination"] + if (!(destination in CONFIG_GET(keyed_list/cross_server)) && destination != "all") + message_admins("[ADMIN_LOOKUPFLW(user)] has passed an invalid destination into comms console cross-sector message. Message: \"[message]\"") + return user.log_message("is about to send the following message to [destination]: [message]", LOG_GAME) to_chat( @@ -350,7 +353,7 @@ "CROSS-SECTOR MESSAGE (OUTGOING): [ADMIN_LOOKUPFLW(user)] is about to send \ the following message to [destination] (will autoapprove in [GLOB.communications_controller.soft_filtering ? DisplayTimeText(EXTENDED_CROSS_SECTOR_CANCEL_TIME) : DisplayTimeText(CROSS_SECTOR_CANCEL_TIME)]): \ REJECT
\ - [html_encode(message)]" \ + [message]" \ ) )