Add pingability to staff-say, dev-say and mentor-say (#31377)

* Add pingability to staff-say and dev-say

* Consolidate all pinging to a proc, add it to mentor-say

* Make pings work with ckeys regardless of stealth-mode
This commit is contained in:
Toastical
2026-01-27 03:46:00 +02:00
committed by GitHub
parent 6c294803a2
commit 70b9bed2c3
2 changed files with 24 additions and 12 deletions
+13 -12
View File
@@ -24,14 +24,9 @@ USER_VERB(admin_say, R_ADMIN, "Asay", "Asay", VERB_CATEGORY_HIDDEN, msg as text)
var/display_color = client.get_staffsay_color()
for(var/client/C in GLOB.admins)
var/temp_message = msg
if(R_ADMIN & C.holder.rights)
// Lets see if this admin was pinged in the asay message
if(findtext(temp_message, "@[C.ckey]") || findtext(temp_message, "@[C.key]")) // Check ckey and key, so you can type @AffectedArc07 or @affectedarc07
SEND_SOUND(C, sound('sound/misc/ping.ogg'))
temp_message = replacetext(temp_message, "@[C.ckey]", "<font color='red'>@[C.ckey]</font>")
temp_message = replacetext(temp_message, "@[C.key]", "<font color='red'>@[C.key]</font>") // Same applies here. key and ckey.
var/temp_message = do_chat_ping(C, msg)
temp_message = SPAN_EMOJI_ENABLED("[temp_message]")
to_chat(C, SPAN_ADMIN_CHANNEL("ADMIN: <font color='[display_color]'>[key_name(client, 1)]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[temp_message]")]"), MESSAGE_TYPE_ADMINCHAT, confidential = TRUE)
@@ -64,8 +59,10 @@ USER_VERB(dev_say, R_ADMIN|R_DEV_TEAM, "Devsay", "Devsay", VERB_CATEGORY_HIDDEN,
display_name = "[client.holder.fakekey]/([client.key])"
else
display_name = client.holder.fakekey
msg = SPAN_EMOJI_ENABLED("[msg]")
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "dev_channel_admin" : "dev_channel"]'>DEV: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[msg]")]</span>", MESSAGE_TYPE_DEVCHAT, confidential = TRUE)
var/temp_message = do_chat_ping(C, msg)
temp_message = SPAN_EMOJI_ENABLED("[temp_message]")
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "dev_channel_admin" : "dev_channel"]'>DEV: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[temp_message]")]</span>", MESSAGE_TYPE_DEVCHAT, confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Devsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -99,8 +96,10 @@ USER_VERB(staff_say, R_ADMIN|R_MENTOR|R_DEV_TEAM, "Staffsay", "Staffsay", VERB_C
display_name = "[client.holder.fakekey]/([client.key])"
else
display_name = client.holder.fakekey
msg = SPAN_EMOJI_ENABLED("[msg]")
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "staff_channel_admin" : "staff_channel"]'>STAFF: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[msg]")]</span>", MESSAGE_TYPE_STAFFCHAT, confidential = TRUE)
var/temp_message = do_chat_ping(C, msg)
temp_message = SPAN_EMOJI_ENABLED("[temp_message]")
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "staff_channel_admin" : "staff_channel"]'>STAFF: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[temp_message]")]</span>", MESSAGE_TYPE_STAFFCHAT, confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Staffsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -135,8 +134,10 @@ USER_VERB(mentor_say, R_ADMIN|R_MENTOR|R_MOD, "Msay", "Use mentorsay.", VERB_CAT
display_name = "[client.holder.fakekey]/([client.key])"
else
display_name = client.holder.fakekey
msg = SPAN_EMOJI_ENABLED("[msg]")
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[msg]")]</span>", MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
var/temp_message = do_chat_ping(C, msg)
temp_message = SPAN_EMOJI_ENABLED("[temp_message]")
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): [SPAN_MESSAGE("[temp_message]")]</span>", MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Msay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!