mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 03:55:18 -04:00
Don't allow using opchat or adminchat when muted, or chatmod is on and don't have voice.
This commit is contained in:
parent
2cbb319340
commit
9ec063762a
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user