Fix compile errors from the merge.

This commit is contained in:
UnknownShadow200 2016-09-05 10:19:27 +10:00
parent 3789d2e419
commit 60e3a71611
3 changed files with 7 additions and 9 deletions

View File

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

View File

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

View File

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