Only mods and higher should use Mod Chat Channel

This commit is contained in:
Svenja Reissaus
2018-08-02 11:54:39 -03:00
parent 1ac9c123d0
commit d6d8031804
3 changed files with 12 additions and 1 deletions

View File

@@ -37,8 +37,12 @@ public class CmdChat extends FCommand {
if (modeString != null) {
modeString = modeString.toLowerCase();
if (modeString.startsWith("m")) {
// Only allow Mods and higher rank to switch to this channel.
if (modeString.startsWith("m") && fme.getRole().isAtLeast(Role.MODERATOR)) {
modeTarget = ChatMode.MOD;
} else if (modeString.startsWith("m") && !fme.getRole().isAtLeast(Role.MODERATOR)) {
msg(TL.COMMAND_CHAT_MOD_ONLY);
return;
} else if (modeString.startsWith("p")) {
modeTarget = ChatMode.PUBLIC;
} else if (modeString.startsWith("a")) {