diff --git a/Commands/Economy/CmdBalance.cs b/Commands/Economy/CmdBalance.cs index 370a756b3..3b48b2bb6 100644 --- a/Commands/Economy/CmdBalance.cs +++ b/Commands/Economy/CmdBalance.cs @@ -30,7 +30,7 @@ namespace MCGalaxy.Commands { public override void Use(Player p, string message) { if (CheckSuper(p, message, "player name")) return; - if (!ValidName(p, message, "player")) return; + if (!Formatter.ValidName(p, message, "player")) return; int matches = 1; Player who = message == "" ? p : PlayerInfo.FindMatches(p, message, out matches); if (matches > 1) return; diff --git a/Commands/Moderation/CmdPlayerEditDB.cs b/Commands/Moderation/CmdPlayerEditDB.cs index eee3e069e..607e7b85e 100644 --- a/Commands/Moderation/CmdPlayerEditDB.cs +++ b/Commands/Moderation/CmdPlayerEditDB.cs @@ -32,12 +32,10 @@ namespace MCGalaxy.Commands { public override void Use(Player p, string message) { if (message == "") { Help(p); return; } string[] args = message.SplitSpaces(3); - Player who = PlayerInfo.Find(args[0]); - if (who == null) { - string target = PlayerInfo.FindOfflineNameMatches(p, args[0]); - if (target == null) return; - args[0] = target; - } + args[0] = PlayerInfo.FindMatchesPreferOnline(p, args[0]); + + if (args[0] == null) return; + Player who = PlayerInfo.FindExact(args[0]); if (args.Length == 1) { Player.Message(p, Colors.red + "You must specify a type to modify."); MessageValidTypes(p); return; diff --git a/Commands/Moderation/CmdUnban.cs b/Commands/Moderation/CmdUnban.cs index 4e9bd7617..b5be10704 100644 --- a/Commands/Moderation/CmdUnban.cs +++ b/Commands/Moderation/CmdUnban.cs @@ -31,10 +31,10 @@ namespace MCGalaxy.Commands.Moderation { Player who = PlayerInfo.Find(args[0]); string name = who == null ? args[0] : who.name; string reason = args.Length > 1 ? args[1] : "(none given)"; - Unban(p, name, who, reason); + Unban(p, name, reason); } - void Unban(Player p, string name, Player who, string reason) { + void Unban(Player p, string name, string reason) { string srcFull = p == null ? "(console)" : p.ColoredName + "%S"; string src = p == null ? "(console)" : p.name; Group banned = Group.findPerm(LevelPermission.Banned);