diff --git a/MCGalaxy/Commands/Economy/CmdAward.cs b/MCGalaxy/Commands/Economy/CmdAward.cs index ab1fb668c..23ff71058 100644 --- a/MCGalaxy/Commands/Economy/CmdAward.cs +++ b/MCGalaxy/Commands/Economy/CmdAward.cs @@ -24,7 +24,6 @@ namespace MCGalaxy.Commands.Eco { public override LevelPermission defaultRank { get { return LevelPermission.Operator; } } public override void Use(Player p, string message) { - if (message.Length == 0 || message.IndexOf(' ') == -1) { Help(p); return; } bool take = false; if (message.CaselessStarts("give ")) { message = message.Substring(5); @@ -33,28 +32,30 @@ namespace MCGalaxy.Commands.Eco { } string[] args = message.SplitSpaces(2); + if (args.Length < 2) { Help(p); return; } string plName = PlayerInfo.FindMatchesPreferOnline(p, args[0]); if (plName == null) return; - - string award = args.Length > 1 ? args[1] : ""; - award = Matcher.FindAwards(p, award); + string award = Matcher.FindAwards(p, args[1]); if (award == null) { Player.Message(p, "Use %T/Awards %Sfor a list of awards"); return; } + string displayName = PlayerInfo.GetColoredName(p, plName); if (!take) { if (Awards.GiveAward(plName, award)) { - Chat.MessageGlobal("{0} %Swas awarded: &b{1}", - PlayerInfo.GetColoredName(p, plName), award); + Chat.MessageGlobal("{0} %Swas awarded: &b{1}", displayName, award); Awards.SavePlayers(); + } else if (p != null && plName.CaselessEq(p.name)) { + Player.Message(p, "You already have that award."); } else { - Player.Message(p, "The player already has that award."); return; + Player.Message(p, "{0} %Salready has that award.", displayName); } } else { if (Awards.TakeAward(plName, award)) { - Chat.MessageGlobal("{0} %Shad their &b{1} %Saward removed", - PlayerInfo.GetColoredName(p, plName), award); + Chat.MessageGlobal("{0} %Shad their &b{1} %Saward removed", displayName, award); Awards.SavePlayers(); + } else if (p != null && plName.CaselessEq(p.name)) { + Player.Message(p, "You did not have that award to begin with."); } else { - Player.Message(p, "The player didn't have the award you tried to take"); return; + Player.Message(p, "{0} %Sdid not have that award to begin with.", displayName); } } } diff --git a/MCGalaxy/CorePlugin/NotesPlugin.cs b/MCGalaxy/CorePlugin/NotesPlugin.cs index 394885fa4..8f0c7a50f 100644 --- a/MCGalaxy/CorePlugin/NotesPlugin.cs +++ b/MCGalaxy/CorePlugin/NotesPlugin.cs @@ -44,7 +44,7 @@ namespace MCGalaxy.Core { case ModActionType.Muted: AddNote(action, "M"); break; case ModActionType.Warned: - AddNote(action, "W"); break; + AddNote(action, "W"); break; case ModActionType.Ban: string banType = action.Duration.Ticks != 0 ? "T" : "B"; AddNote(action, banType); break;