Files
Yogstation/code/modules/admin/verbs/adminsay.dm
Jamie D 3d6cdec4bb [Admin] Makes the Admin verbs Less Shit (#10425)
* Admin Verbs

* Interner sound fix
2020-11-15 18:41:25 +00:00

29 lines
1.2 KiB
Plaintext

//mirrored in the yogstation folder
/client/proc/cmd_admin_say(msg as text)
set category = "Misc.Unused"
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = TRUE
if(!check_rights(0))
return
msg = to_utf8(msg, src)
msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN))
if(!msg)
return
mob.log_talk(msg, LOG_ASAY)
msg = keywords_lookup(msg)
var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && prefs.asaycolor) ? "<font color=[prefs.asaycolor]>" : null // Yogs -- yogs asay
msg = "<span class='adminsay'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> [ADMIN_FLW(mob)]: [custom_asay_color]<span class='message linkify'>[msg]</span></span>[custom_asay_color ? "</font>":null]"
to_chat(GLOB.admins,
type = MESSAGE_TYPE_ADMINCHAT,
html = msg,
confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/get_admin_say()
var/msg = input(src, null, "asay \"text\"") as text|null
msg = to_utf8(msg, src)
cmd_admin_say(msg)