forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from tf-4/loud-asay
Loud asay
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ADMIN_VERB(cmd_loud_admin_say, R_NONE, "loudAsay", "Send a message to other admins (loudly).", ADMIN_CATEGORY_MAIN, message as text) | ||
message = emoji_parse(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN)) | ||
if(!message) | ||
return | ||
|
||
user.mob.log_talk(message, LOG_ASAY) | ||
message = keywords_lookup(message) | ||
var/asay_color = user.prefs.read_preference(/datum/preference/color/asay_color) | ||
var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && asay_color) ? "<font color=[asay_color]>" : "<font color='[DEFAULT_ASAY_COLOR]'>" | ||
message = "[span_command_headset("[span_adminsay("[span_prefix("ADMIN:")] <EM>[key_name_admin(user)]</EM> [ADMIN_FLW(user.mob)]: [custom_asay_color]<span class='message linkify'>[message]")]</span>[custom_asay_color ? "</font>":null]")]" | ||
to_chat(GLOB.admins, | ||
type = MESSAGE_TYPE_ADMINCHAT, | ||
html = message, | ||
confidential = TRUE) | ||
|
||
for(var/client/admin_client in GLOB.admins) | ||
if(admin_client?.prefs?.toggles & SOUND_ADMINHELP) | ||
SEND_SOUND(admin_client, sound('modular_doppler/loud_asay/sound/duckhonk.ogg')) //Stop using loud mode if you don't need to. | ||
window_flash(admin_client, ignorepref = TRUE) | ||
|
||
BLACKBOX_LOG_ADMIN_VERB("Loud Asay") |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters