mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-01 20:17:18 +01:00
ae475697c0
* Corrects record_feedback()'s copy/paste comment (#74962)
## About The Pull Request
Corrects `record_feedback()`'s copy/paste comment.
## Pointless history
Originally being added in e2a8a5e, it kept its name and args for quite a
few years, that was until #32188 which had it renamed to
`record_feedback` and its args pretty much doubled. In between these
times the known copy/paste comment was already around, but that wasn't
updated, until now apparently.
* Corrects record_feedback()'s copy/paste comment
---------
Co-authored-by: Zandario <zandarioh@gmail.com>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
/client/proc/dsay(msg as text)
|
|
set category = "Admin.Game"
|
|
set name = "Dsay"
|
|
set hidden = TRUE
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
|
|
return
|
|
if(!mob)
|
|
return
|
|
if(prefs.muted & MUTE_DEADCHAT)
|
|
to_chat(src, span_danger("You cannot send DSAY messages (muted)."), confidential = TRUE)
|
|
return
|
|
|
|
if (handle_spam_prevention(msg,MUTE_DEADCHAT))
|
|
return
|
|
|
|
msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
|
mob.log_talk(msg, LOG_DSAY)
|
|
|
|
if (!msg)
|
|
return
|
|
var/rank_name = holder.rank_names()
|
|
var/admin_name = key
|
|
if(holder.fakekey)
|
|
rank_name = pick(strings("admin_nicknames.json", "ranks", "config"))
|
|
admin_name = pick(strings("admin_nicknames.json", "names", "config"))
|
|
var/name_and_rank = "[span_tooltip(rank_name, "STAFF")] ([admin_name])"
|
|
|
|
deadchat_broadcast("[span_prefix("DEAD:")] [name_and_rank] says, <span class='message'>\"[emoji_parse(msg)]\"</span>")
|
|
|
|
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
|
|
|
|
/client/proc/get_dead_say()
|
|
var/msg = input(src, null, "dsay \"text\"") as text|null
|
|
|
|
if (isnull(msg))
|
|
return
|
|
|
|
dsay(msg)
|