mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
Adds a config option MENTORS which sets the variable config.mods_are_mentors Adds a rights level of R_MENTOR which gets msay, private message, aghost, notes, and a new proc for checking for new players (requires database support). If the confic option for mentors is set then the ckeys listed in moderators.txt file will instead be set as mentors, you can still make moderators by adding them in admins.txt staffwho will show Mentors instead of Moderators as the heading above the listing of non-admins. Also: Players now get a message gently reminding them to click the name of the staff member to reply instead of ahelping over and over.
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
/client/proc/dsay(msg as text)
|
|
set category = "Special Verbs"
|
|
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
|
|
set hidden = 1
|
|
if(!src.holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
if(!src.mob)
|
|
return
|
|
if(prefs.muted & MUTE_DEADCHAT)
|
|
src << "\red You cannot send DSAY messages (muted)."
|
|
return
|
|
|
|
if(!(prefs.toggles & CHAT_DEAD))
|
|
src << "\red You have deadchat muted."
|
|
return
|
|
|
|
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
|
return
|
|
|
|
var/stafftype = null
|
|
|
|
if (src.holder.rights & R_MOD)
|
|
stafftype = "MOD"
|
|
|
|
if (src.holder.rights & R_MENTOR)
|
|
stafftype = "MENTOR"
|
|
|
|
if (src.holder.rights & R_ADMIN)
|
|
stafftype = "ADMIN"
|
|
|
|
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
|
log_admin("[key_name(src)] : [msg]")
|
|
|
|
if (!msg)
|
|
return
|
|
|
|
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[stafftype]([src.holder.fakekey ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
|
|
|
for (var/mob/M in player_list)
|
|
if (istype(M, /mob/new_player))
|
|
continue
|
|
|
|
if(M.client && M.client.holder && (M.client.prefs.toggles & CHAT_DEAD)) // show the message to admins who have deadchat toggled on
|
|
M.show_message(rendered, 2)
|
|
|
|
else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // show the message to regular ghosts who have deadchat toggled on
|
|
M.show_message(rendered, 2)
|
|
|
|
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|