Fix /queue not working from console, fix /voice allowing lower ranked players to voice higher ranked players.

This commit is contained in:
UnknownShadow200 2016-04-08 09:16:13 +10:00
parent 54534354ba
commit c99e68530b
2 changed files with 7 additions and 4 deletions

View File

@ -37,19 +37,19 @@ namespace MCGalaxy.Commands
Player who = PlayerInfo.FindOrShowMatches(p, value);
if (who == null) return;
p.SendMessage(value + " was queued.");
Player.SendMessage(p, value + " was queued.");
Server.zombie.QueuedZombie = value;
} else if (args[0].CaselessEq("level")) {
if (LevelInfo.ExistsOffline(value)) {
p.SendMessage(value + " was queued.");
Player.SendMessage(p, value + " was queued.");
Server.zombie.QueuedLevel = value.ToLower();
if (Server.zombie.CurLevel != null)
Server.zombie.CurLevel.ChatLevel(value + " was queued as the next map.");
} else {
p.SendMessage("Level does not exist.");
Player.SendMessage(p, "Level does not exist.");
}
} else {
p.SendMessage("You did not enter a valid option.");
Player.SendMessage(p, "You did not enter a valid option.");
}
}

View File

@ -28,6 +28,9 @@ namespace MCGalaxy.Commands {
if (message == "" && p == null) { Help(p); return; }
Player who = message == "" ? p : PlayerInfo.FindOrShowMatches(p, message);
if (who == null) return;
if (p != null && who.group.Permission > p.group.Permission) {
MessageTooHighRank(p, "voice", true); return;
}
if (who.voice) {
Player.SendMessage(p, "Removing voice status from " + who.color + who.DisplayName);