Files
Paradise/code/modules/admin/verbs/deadsay.dm
DZD 1fa2c164f9 Mute Changes
- R_MOD is now needed to mute players.
- Admins/mods/mentors can now be muted. The first two can unmute
themselves, the third cannot.
- Global OOC mute now applies to mentors as well, but not to admins or mods.
- Global Deadchat mute still only applies to regular players.
- Mods using DSAY will show up as MOD instead of MENTOR.
2015-04-04 20:05:42 -04:00

41 lines
1.2 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_MENTOR)
stafftype = "MENTOR"
if (src.holder.rights & R_MOD)
stafftype = "MOD"
if (src.holder.rights & R_ADMIN)
stafftype = "ADMIN"
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("[key_name(src)] : [msg]")
if (!msg)
return
say_dead_direct("<span class='name'>[stafftype] ([src.holder.fakekey ? src.holder.fakekey : src.key])</span> says, <span class='message'>\"[msg]\"</span>")
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!