Files
Paradise/code/modules/admin/verbs/deadsay.dm
larentoun c5c911d252 [DOWNSTREAM] Cyrillic Support v2 (#24075)
* cyrillic fixes cbdad6f11f

* fix: remove control characters

* utf-8 support

* more fixes

* spellbook to utf8

* Update code/modules/research/server.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/research/server.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/paperwork/paper.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/paperwork/folders.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/mob/mob_say_base.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* update formatting

* fix ai alerts

* fix spaceheater

* fix noticeboard

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2024-03-11 09:35:08 +00:00

52 lines
1.3 KiB
Plaintext

/client/proc/dsay(msg as text)
set category = "Admin"
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
set hidden = 1
if(!check_rights(R_ADMIN|R_MOD))
return
if(!src.mob)
return
if(check_mute(ckey, MUTE_DEADCHAT))
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
return
if(!(prefs.toggles & PREFTOGGLE_CHAT_DEAD))
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
return
if(handle_spam_prevention(msg,MUTE_DEADCHAT))
return
var/stafftype = null
if(check_rights(R_MENTOR, 0))
stafftype = "MENTOR"
if(check_rights(R_MOD, 0))
stafftype = "MOD"
if(check_rights(R_ADMIN, 0))
stafftype = "ADMIN"
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
log_admin("[key_name(src)] : [msg]")
if(!msg)
return
var/prefix = "[stafftype] ([src.key])"
if(holder.fakekey)
prefix = "Administrator"
say_dead_direct("<span class='name'>[prefix]</span> says, <span class='message'>\"[msg]\"</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/get_dead_say()
if(!check_rights(R_ADMIN))
return
var/msg = input(src, null, "dsay \"text\"") as text | null
dsay(msg)