diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ca2652eb049..25afaf30113 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -701,9 +701,9 @@ var/global/enabled_spooking = 0 if (!check_rights(R_ADMIN)) return - var/message = tgui_input_text(usr, "Enter a global message to send.", "Admin Announce", multiline = TRUE) + var/message = tgui_input_text(usr, "Enter a global message to send.", "Admin Announce", multiline = TRUE, encode = FALSE) if(message) - if(!check_rights(R_SERVER, 0)) + if(!check_rights(R_ADMIN, 0)) message = sanitize(message, 500, extra = 0) message = replacetext(message, "\n", "
") // required since we're putting it in a

tag to_world("[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:

[message]

") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 2855f174b1c..18c938790cd 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -26,7 +26,7 @@ to_chat(src, "Only administrators may use this command.") return - var/msg = tgui_input_text(usr, "Enter your subtle message", "Subtle PM to [M.key]") + var/msg = tgui_input_text(usr, "Enter your subtle message.", "Subtle PM to [M.key]", encode = FALSE) if (!msg) return @@ -36,7 +36,7 @@ to_chat(M, "You hear a voice in your head... [msg]") log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]") - message_admins(SPAN_NOTICE("SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]"), 1) + message_admins(SPAN_NOTICE("SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [sanitize_tg(msg)]"), 1) feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_mentor_check_new_players() //Allows mentors / admins to determine who the newer players are. @@ -83,12 +83,12 @@ to_chat(src, "Only administrators may use this command.") return - var/msg = tgui_input_text(usr, "Enter the text you wish to appear to everyone:", "Message:") + var/msg = tgui_input_text(usr, "Enter the text you wish to appear to everyone.", "Global Narrate", encode = FALSE) if (!msg) return to_world("[msg]") - log_admin("GlobalNarrate: [key_name(usr)] : [msg]") + log_admin("GlobalNarrate: [key_name(usr)] : [sanitize_tg(msg)]") message_admins(SPAN_NOTICE("\bold GlobalNarrate: [key_name_admin(usr)] : [msg]
"), 1) feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -110,13 +110,13 @@ else return - var/msg = tgui_input_text(usr, "Enter the text you wish to appear to everyone within seven tiles of you:", "Message:") + var/msg = tgui_input_text(usr, "Enter the text you wish to appear to everyone within seven tiles of you.", "Local Narrate", encode = FALSE) if(!msg) return for(var/M in message_mobs) to_chat(M, msg) log_admin("LocalNarrate: [key_name(usr)] : [msg]") - message_admins(SPAN_NOTICE("\bold LocalNarrate: [key_name_admin(usr)] : [msg]
"), 1) + message_admins(SPAN_NOTICE("\bold LocalNarrate: [key_name_admin(usr)] : [sanitize_tg(msg)]
"), 1) feedback_add_details("admin_verb", "LCLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -192,14 +192,14 @@ if(!M) return - var/msg = tgui_input_text(usr, "Enter the text you wish to appear to your target:", "Message:") + var/msg = tgui_input_text(usr, "Enter the text you wish to appear to your target.", "Direct Narrate", encode = FALSE) if( !msg ) return to_chat(M, msg) log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]") - message_admins(SPAN_NOTICE("\bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
"), 1) + message_admins(SPAN_NOTICE("\bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [sanitize_tg(msg)]
"), 1) feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_godmode(mob/M as mob in GLOB.mob_list) diff --git a/html/changelogs/mattatlas-announcefixes.yml b/html/changelogs/mattatlas-announcefixes.yml new file mode 100644 index 00000000000..f5f8e30cfae --- /dev/null +++ b/html/changelogs/mattatlas-announcefixes.yml @@ -0,0 +1,58 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixes admin announces sanitizing HTML, meaning that admins can terrorize you with big red text once more."