From c99e68530b63740ec3ff4a4c7012f01f4a32b111 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 8 Apr 2016 09:16:13 +1000 Subject: [PATCH] Fix /queue not working from console, fix /voice allowing lower ranked players to voice higher ranked players. --- Commands/Fun/ZombieSurvival/CmdQueue.cs | 8 ++++---- Commands/Moderation/CmdVoice.cs | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Commands/Fun/ZombieSurvival/CmdQueue.cs b/Commands/Fun/ZombieSurvival/CmdQueue.cs index 7ef603cc7..bcd30116d 100644 --- a/Commands/Fun/ZombieSurvival/CmdQueue.cs +++ b/Commands/Fun/ZombieSurvival/CmdQueue.cs @@ -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."); } } diff --git a/Commands/Moderation/CmdVoice.cs b/Commands/Moderation/CmdVoice.cs index 944bdad1a..3adc45df7 100644 --- a/Commands/Moderation/CmdVoice.cs +++ b/Commands/Moderation/CmdVoice.cs @@ -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);