From 95a2a89d639daf0ed6c3ad680ae35d0741af09af Mon Sep 17 00:00:00 2001 From: Selis Date: Sat, 19 Aug 2023 20:09:19 +0200 Subject: [PATCH] Pray improvements --- code/_helpers/logging.dm | 5 +++++ code/modules/admin/verbs/pray.dm | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 5dc784d1b3d..9e3a7addb8d 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -35,6 +35,11 @@ if (config.log_admin) WRITE_LOG(diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]") +/proc/log_pray(text, client/source) + admin_log.Add(text) + if (config.log_admin) + WRITE_LOG(diary, "PRAY: [key_name(source)]: [text]") + /proc/log_debug(text) if (config.log_debug) WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]") diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index b6bb02fa76d..ca72487e404 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -1,4 +1,4 @@ -/mob/verb/pray(msg as text) +/mob/verb/pray() set category = "IC" set name = "Pray" @@ -6,18 +6,18 @@ to_chat(usr, "Speech is currently admin-disabled.") return - msg = sanitize(msg) - if(!msg) return + var/raw_msg = sanitize(tgui_input_text(usr, "Prayers are sent to staff, but do do not open tickets or go to discord. If you have a technical difficulty or an event/spice idea/hook - please ahelp instead. Thank you!", "Pray", null, MAX_MESSAGE_LEN)) + if(!raw_msg) return if(usr.client) - if(msg) + if(raw_msg) client.handle_spam_prevention(MUTE_PRAY) if(usr.client.prefs.muted & MUTE_PRAY) to_chat(usr, " You cannot pray (muted).") return var/icon/cross = icon('icons/obj/storage.dmi',"bible") - msg = "\icon[cross][bicon(cross)] PRAY: [key_name(src, 1)] [ADMIN_QUE(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] ([admin_jump_link(src, src)]) [ADMIN_CA(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]: [msg]" + var/msg = "\icon[cross][bicon(cross)] PRAY: [key_name(src, 1)] [ADMIN_QUE(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] ([admin_jump_link(src, src)]) [ADMIN_CA(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]: [raw_msg]" for(var/client/C in GLOB.admins) if(R_ADMIN|R_EVENT & C.holder.rights) @@ -27,7 +27,7 @@ to_chat(usr, "Your prayers have been received by the gods.") feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - //log_admin("HELP: [key_name(src)]: [msg]") + log_pray(raw_msg, src) /proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage) msg = "[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:[key_name(Sender, 1)] [ADMIN_PP(Sender)] [ADMIN_VV(Sender)] [ADMIN_SM(Sender)] ([admin_jump_link(Sender)]) [ADMIN_CA(Sender)] [ADMIN_BSA(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]: [msg]"