From de944a135c42edb72c95c7d2942309f4b619d714 Mon Sep 17 00:00:00 2001 From: "baloh.matevz@gmail.com" Date: Wed, 19 Oct 2011 12:49:02 +0000 Subject: [PATCH] - The admin-mute verb and mute option in the player panel now makes the mob unable to speak in everything except for adminhelps and admin private messages. - The player panel now has a Compelte mute option, which mutes everything including adminhelps and admin pm-s. - A person who is muted will now be informed he is whenever they try to speak/OOC/etc. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2391 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/mob/mob.dm | 3 ++- code/game/verbs/ooc.dm | 3 ++- code/modules/admin/admin.dm | 14 +++++++++++++- code/modules/admin/verbs/adminhelp.dm | 2 +- code/modules/admin/verbs/adminsay.dm | 2 +- code/modules/admin/verbs/deadsay.dm | 2 +- code/modules/admin/verbs/pray.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/mob/dead/observer/say.dm | 3 ++- code/modules/mob/living/carbon/human/emote.dm | 3 ++- code/modules/mob/living/carbon/human/whisper.dm | 3 ++- code/modules/mob/living/say.dm | 3 ++- code/modules/mob/living/silicon/say.dm | 3 ++- code/modules/mob/mob.dm | 2 +- 14 files changed, 33 insertions(+), 14 deletions(-) diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm index d1bf9e743d4..24ab032f220 100644 --- a/code/defines/mob/mob.dm +++ b/code/defines/mob/mob.dm @@ -118,7 +118,8 @@ var/miming = null //checks if the guy is a mime//Human var/silent = null //Can't talk. Value goes down every life proc.//Human - var/muted = null //Can't talk in any way shape or form (Even OOC or emote). An admin punishment + var/muted = null //Can't talk in OOC, say, whisper, emote... anything except for adminhelp and admin-pm. An admin punishment + var/muted_complete = null //Can't talk in any way shape or form (muted + can't adminhelp or respond to admin pm-s). An admin punishment var/obj/hud/hud_used = null diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 16863a72c71..eb9b378ccd1 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -25,7 +25,8 @@ else if (!dooc_allowed && !src.client.holder && (src.client.deadchat != 0)) usr << "OOC for dead mobs has been turned off." return - else if (src.muted) + else if (src.muted || src.muted_complete) + src << "You are muted." return else if (findtext(msg, "byond://") && !src.client.holder) src << "Advertising other servers is not allowed." diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 09afd799e4b..8ff43d7547a 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -380,7 +380,18 @@ M.muted = !M.muted log_admin("[key_name(usr)] has [(M.muted ? "muted" : "voiced")] [key_name(M)].") message_admins("\blue [key_name_admin(usr)] has [(M.muted ? "muted" : "voiced")] [key_name_admin(M)].", 1) - M << "You have been [(M.muted ? "muted" : "voiced")]." + M << "You have been [(M.muted ? "muted" : "voiced")]. Please resolve this in adminhelp." + if (href_list["mute_complete"]) + if ((src.rank in list( "Moderator", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) + var/mob/M = locate(href_list["mute_complete"]) + if (ismob(M)) + if ((M.client && M.client.holder && (M.client.holder.level >= src.level))) + alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null) + return + M.muted_complete = !M.muted_complete + log_admin("[key_name(usr)] has [(M.muted_complete ? "completely muted" : "voiced (complete)")] [key_name(M)].") + message_admins("\blue [key_name_admin(usr)] has [(M.muted_complete ? "completely muted" : "voiced (complete)")] [key_name_admin(M)].", 1) + M << "You have been [(M.muted_complete ? "completely muted" : "voiced (complete)")]. You are unable to speak or even adminhelp" if (href_list["c_mode"]) if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) @@ -1679,6 +1690,7 @@ foo += text("Hasn't Entered Game | ") foo += text("Forcesay | ") foo += text("Mute: [(M.muted ? "Muted" : "Voiced")] | ") + foo += text("Complete mute: [(M.muted ? "Completely Muted" : "Voiced")] | ") foo += text("Boot") foo += text("
") foo += text("Jump to | ") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 43e4d1ca094..60e10d4b593 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -10,7 +10,7 @@ if (!msg) return - if (usr.muted) + if (usr.muted_complete) return for (var/mob/M in world) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index ca2ccc90062..4423c156b2d 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -9,7 +9,7 @@ src << "Only administrators may use this command." return - if (!src.mob || src.mob.muted) + if (!src.mob || src.mob.muted || src.mob.muted_complete) return msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 30eb164e959..448ae4e8177 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -8,7 +8,7 @@ return if(!src.mob) return - if(src.mob.muted) + if(src.mob.muted || src.mob.muted_complete) return msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 30b2b96d7d2..5c48329519e 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -10,7 +10,7 @@ if (!msg) return - if (usr.muted) + if (usr.muted || src.muted_complete) return var/icon/cross = icon('storage.dmi',"bible") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 4ce4e140630..f84a3adf7e3 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -91,7 +91,7 @@ src << "Only administrators may use this command." return if(M) - if(mob.muted) + if(src.mob.muted_complete) src << "You are muted have a nice day" return if (!( ismob(M) )) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index a5c6a7a46bc..1e88d0f2cf0 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -9,7 +9,8 @@ log_say("Ghost/[src.key] : [message]") - if (src.muted) + if (src.muted || src.muted_complete) + src << "You are muted." return . = src.say_dead(message) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 44b21d75147..f7c436ab780 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -62,7 +62,8 @@ message = "[src] [input]" if ("me") - if (muted || silent) + if (muted || silent || muted_complete) + src << "You are muted." return if (stat) return diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 6f84cd58048..58a9fbee69d 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -7,7 +7,8 @@ log_whisper("[src.name]/[src.key] : [message]") - if (src.muted) + if (src.muted || src.muted_complete) + src << "You are muted." return if (src.stat == 2) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index ce2395b9855..65b5b770e0d 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -30,7 +30,8 @@ if (stat == 2) return say_dead(message) - if (muted || silent) + if (muted || silent || src.muted_complete) + src << "You are muted." return // wtf? diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index dac3fc0413d..abe5af04ab0 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -2,7 +2,8 @@ if (!message) return - if (muted) + if (muted || src.muted_complete) + src << "You are muted." return if (stat == 2) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3dce0a8a6dd..2f383fffe67 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -578,7 +578,7 @@ if(href_list["priv_msg"]) var/mob/M = locate(href_list["priv_msg"]) if(M) - if(muted) + if(muted_complete) src << "You are muted have a nice day" return if (!ismob(M))