From 9ec063762ae7812366f9064ca60573ca93835e38 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 11 Jul 2017 16:54:46 +1000 Subject: [PATCH] Don't allow using opchat or adminchat when muted, or chatmod is on and don't have voice. --- MCGalaxy/Chat/ChatModes.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MCGalaxy/Chat/ChatModes.cs b/MCGalaxy/Chat/ChatModes.cs index ed51f0900..43ba75ee4 100644 --- a/MCGalaxy/Chat/ChatModes.cs +++ b/MCGalaxy/Chat/ChatModes.cs @@ -14,6 +14,7 @@ permissions and limitations under the Licenses. */ using System; using MCGalaxy.Commands; +using MCGalaxy.Commands.Chatting; namespace MCGalaxy { public static class ChatModes { @@ -62,11 +63,13 @@ namespace MCGalaxy { public static void MessageOps(Player p, string message) { LevelPermission rank = CommandExtraPerms.MinPerm("opchat", LevelPermission.Operator); + if (!MessageCmd.CanSpeak(p, "opchat")) return; MessageStaff(p, message, rank, "Ops"); } public static void MessageAdmins(Player p, string message) { LevelPermission rank = CommandExtraPerms.MinPerm("adminchat", LevelPermission.Admin); + if (!MessageCmd.CanSpeak(p, "adminchat")) return; MessageStaff(p, message, rank, "Admins"); }