CheckExtraPerms should use extra perms instance description, not ExtraPerms array (in case user defined custom extra perms)

This commit is contained in:
UnknownShadow200 2017-09-05 22:17:45 +10:00
parent 05e6e14c49
commit 6ebf2d7ad4
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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 +