mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-27 15:30:58 -04:00
Fix /queue not working from console, fix /voice allowing lower ranked players to voice higher ranked players.
This commit is contained in:
parent
54534354ba
commit
c99e68530b
@ -37,19 +37,19 @@ namespace MCGalaxy.Commands
|
|||||||
Player who = PlayerInfo.FindOrShowMatches(p, value);
|
Player who = PlayerInfo.FindOrShowMatches(p, value);
|
||||||
if (who == null) return;
|
if (who == null) return;
|
||||||
|
|
||||||
p.SendMessage(value + " was queued.");
|
Player.SendMessage(p, value + " was queued.");
|
||||||
Server.zombie.QueuedZombie = value;
|
Server.zombie.QueuedZombie = value;
|
||||||
} else if (args[0].CaselessEq("level")) {
|
} else if (args[0].CaselessEq("level")) {
|
||||||
if (LevelInfo.ExistsOffline(value)) {
|
if (LevelInfo.ExistsOffline(value)) {
|
||||||
p.SendMessage(value + " was queued.");
|
Player.SendMessage(p, value + " was queued.");
|
||||||
Server.zombie.QueuedLevel = value.ToLower();
|
Server.zombie.QueuedLevel = value.ToLower();
|
||||||
if (Server.zombie.CurLevel != null)
|
if (Server.zombie.CurLevel != null)
|
||||||
Server.zombie.CurLevel.ChatLevel(value + " was queued as the next map.");
|
Server.zombie.CurLevel.ChatLevel(value + " was queued as the next map.");
|
||||||
} else {
|
} else {
|
||||||
p.SendMessage("Level does not exist.");
|
Player.SendMessage(p, "Level does not exist.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p.SendMessage("You did not enter a valid option.");
|
Player.SendMessage(p, "You did not enter a valid option.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ namespace MCGalaxy.Commands {
|
|||||||
if (message == "" && p == null) { Help(p); return; }
|
if (message == "" && p == null) { Help(p); return; }
|
||||||
Player who = message == "" ? p : PlayerInfo.FindOrShowMatches(p, message);
|
Player who = message == "" ? p : PlayerInfo.FindOrShowMatches(p, message);
|
||||||
if (who == null) return;
|
if (who == null) return;
|
||||||
|
if (p != null && who.group.Permission > p.group.Permission) {
|
||||||
|
MessageTooHighRank(p, "voice", true); return;
|
||||||
|
}
|
||||||
|
|
||||||
if (who.voice) {
|
if (who.voice) {
|
||||||
Player.SendMessage(p, "Removing voice status from " + who.color + who.DisplayName);
|
Player.SendMessage(p, "Removing voice status from " + who.color + who.DisplayName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user