mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
fixes #41106 since it'll have it's own fucking location. cl ShizCalev add: Admins can now personalize their asay message color on servers with the feature enabled. tweak: Moved some admin only preference verbs out of the Preferences tab and to a new admin preferences tab to help unclutter it / prevent accidental toggling of fun things. /cl Note that the start of the admin message will still use the default formatting just so it can be quickly recognized as an admin message and not an OOC one.
24 lines
1.0 KiB
Plaintext
24 lines
1.0 KiB
Plaintext
//mirrored in the yogstation folder
|
|
/client/proc/cmd_admin_say(msg as text)
|
|
set category = "Special Verbs"
|
|
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 = 1
|
|
if(!check_rights(0))
|
|
return
|
|
|
|
msg = emoji_parse(copytext(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
|
|
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, msg)
|
|
|
|
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
|
|
cmd_admin_say(msg)
|