Asay Chat Mentions (#15080)

* Asay Chat Mentions

* New ping sound
This commit is contained in:
AffectedArc07
2020-12-16 18:58:37 +00:00
committed by GitHub
parent 8a20f24bb9
commit 84b5f7d300
2 changed files with 6 additions and 0 deletions
+6
View File
@@ -14,6 +14,12 @@
if(check_rights(R_ADMIN,0))
for(var/client/C in GLOB.admins)
if(R_ADMIN & C.holder.rights)
// Lets see if this admin was pinged in the asay message
if(findtext(msg, "@[C.ckey]") || findtext(msg, "@[C.key]")) // Check ckey and key, so you can type @AffectedArc07 or @affectedarc07
SEND_SOUND(C, 'sound/misc/ping.ogg')
msg = replacetext(msg, "@[C.ckey]", "<font color='red'>@[C.ckey]</font>")
msg = replacetext(msg, "@[C.key]", "<font color='red'>@[C.key]</font>") // Same applies here. key and ckey.
msg = "<span class='emoji_enabled'>[msg]</span>"
to_chat(C, "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>")