From 6ebf2d7ad455755cf7cd1d91e087796d91f36d2c Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 5 Sep 2017 22:17:45 +1000 Subject: [PATCH] CheckExtraPerms should use extra perms instance description, not ExtraPerms array (in case user defined custom extra perms) --- MCGalaxy/Commands/Command.Helpers.cs | 5 ++--- MCGalaxy/Network/Heartbeat/ClassiCube.cs | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MCGalaxy/Commands/Command.Helpers.cs b/MCGalaxy/Commands/Command.Helpers.cs index bd68dae23..6ff5dbee1 100644 --- a/MCGalaxy/Commands/Command.Helpers.cs +++ b/MCGalaxy/Commands/Command.Helpers.cs @@ -59,9 +59,8 @@ namespace MCGalaxy { protected bool CheckExtraPerm(Player p, int num) { if (HasExtraPerm(p, num)) return true; - LevelPermission perm = CommandExtraPerms.MinPerm(name, num); - string action = ExtraPerms[num - 1].Description; - Formatter.MessageNeedMinPerm(p, action, perm); + CommandExtraPerms perms = CommandExtraPerms.Find(name, num); + Formatter.MessageNeedMinPerm(p, perms.Description, perms.MinRank); return false; } diff --git a/MCGalaxy/Network/Heartbeat/ClassiCube.cs b/MCGalaxy/Network/Heartbeat/ClassiCube.cs index 26d1c7ac7..3f3692a34 100644 --- a/MCGalaxy/Network/Heartbeat/ClassiCube.cs +++ b/MCGalaxy/Network/Heartbeat/ClassiCube.cs @@ -63,7 +63,8 @@ namespace MCGalaxy.Network { Server.zombie.OnHeartbeat(ref name); name = Colors.Strip(name); - return "&port=" + ServerConfig.Port + + return + "&port=" + ServerConfig.Port + "&max=" + ServerConfig.MaxPlayers + "&name=" + Uri.EscapeDataString(name) + "&public=" + ServerConfig.Public +