Added a deadchat toggle for all players.

* Both admins and regular players can toggle deadchat off
* Having deadchat on still requires you to be a ghost or an admin/mod to be able to /see/ deadchat
This commit is contained in:
Kilakk
2013-07-27 22:54:30 -04:00
parent 213983491c
commit d7d84ff515
5 changed files with 36 additions and 10 deletions
+9 -1
View File
@@ -11,6 +11,10 @@
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
@@ -25,7 +29,11 @@
for (var/mob/M in player_list)
if (istype(M, /mob/new_player))
continue
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
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!