[MIRROR] moves law outputs to a block (#11706)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-20 00:48:39 +02:00
committed by GitHub
co-authored by Kashargul
parent 9efbeb86af
commit 19006d64ac
13 changed files with 51 additions and 54 deletions
+14 -25
View File
@@ -101,40 +101,29 @@
else
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
if(msg)
to_chat(src, msg)
else
current_ticket.MessageNoRecipient(msg)
return
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = tgui_input_text(src, "Message:", "Private message to [key_name(recipient, 0, 0)]", multiline = TRUE, encode = FALSE)
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG, FALSE)||irc)//no sending html to the poor bots
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
return
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: You are unable to use admin PM-s (muted)."))
return
if (src.handle_spam_prevention(MUTE_ADMINHELP))
return
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
else
current_ticket.MessageNoRecipient(msg)
return
if(prefs.muted & MUTE_ADMINHELP)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: You are unable to use admin PM-s (muted)."))
return
if (src.handle_spam_prevention(MUTE_ADMINHELP))
return
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG, FALSE)||irc)//no sending html to the poor bots
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
to_chat(src, msg)
else
current_ticket.MessageNoRecipient(msg)
return
var/rawmsg = msg