diff --git a/MCGalaxy/Commands/other/CmdFakerank.cs b/MCGalaxy/Commands/other/CmdFakerank.cs
index c7db39aba..f3d7615a7 100644
--- a/MCGalaxy/Commands/other/CmdFakerank.cs
+++ b/MCGalaxy/Commands/other/CmdFakerank.cs
@@ -27,7 +27,7 @@ namespace MCGalaxy.Commands {
string[] args = message.Split(' ');
if (message == "" || args.Length < 2) { Help(p); return; }
Player who = PlayerInfo.FindMatches(p, args[0]);
- Group grp = Group.FindMatches(p, args[1]);
+ Group grp = Group.FindMatches(p, args[1]);
if (who == null || grp == null) return;
if (p != null && who.Rank > p.Rank) {
diff --git a/MCGalaxy/Economy/Economy.cs b/MCGalaxy/Economy/Economy.cs
index 9b226084a..5bedca61f 100644
--- a/MCGalaxy/Economy/Economy.cs
+++ b/MCGalaxy/Economy/Economy.cs
@@ -20,7 +20,6 @@ using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
-using System.Text;
using MCGalaxy.Eco;
using MCGalaxy.SQL;
@@ -103,12 +102,13 @@ namespace MCGalaxy {
Item item = GetItem(args[0]);
if (item == null) return;
- if (args[1].CaselessEq("enabled"))
+ if (args[1].CaselessEq("enabled")) {
item.Enabled = args[2].CaselessEq("true");
- else if (args[1].CaselessEq("purchaserank"))
+ } else if (args[1].CaselessEq("purchaserank")) {
item.PurchaseRank = (LevelPermission)int.Parse(args[2]);
- else
+ } else {
item.Parse(line, args);
+ }
}
}
diff --git a/MCGalaxy/Player/Ban.cs b/MCGalaxy/Player/Ban.cs
index f73c4e294..eed24c751 100644
--- a/MCGalaxy/Player/Ban.cs
+++ b/MCGalaxy/Player/Ban.cs
@@ -34,22 +34,22 @@ namespace MCGalaxy {
}
public static string FormatBan(string banner, string reason) {
- return "Banned for \"" + reason + "\" by " + banner;
+ return "Banned by " + banner + ": " + reason;
}
/// Adds a ban entry for the given user, and who banned them and why they were banned.
- public static void BanPlayer(Player p, string who, string reason, bool stealth, string oldrank) {
+ public static void BanPlayer(Player banner, string target, string reason, bool stealth, string oldrank) {
reason = reason.Replace(" ", "%20");
- string player = p == null ? "(console)" : p.name.ToLower();
- AddBanEntry(player, who.ToLower(), reason, stealth.ToString(), FormatDate(), oldrank);
+ string player = banner == null ? "(console)" : banner.truename;
+ AddBanEntry(player, target.ToLower(), reason, stealth.ToString(), FormatDate(), oldrank);
}
/// Adds a ban entry for the given user, and who banned them and why they were banned.
- public static void UnbanPlayer(Player p, string who, string reason) {
+ public static void UnbanPlayer(Player unbanner, string target, string reason) {
reason = reason.Replace(" ", "%20");
- string player = p == null ? "(console)" : p.name.ToLower();
- AddUnbanEntry(player, who.ToLower(), reason, FormatDate());
+ string player = unbanner == null ? "(console)" : unbanner.truename;
+ AddUnbanEntry(player, target.ToLower(), reason, FormatDate());
}
static string FormatDate() {
diff --git a/MCGalaxy/Player/TabList.cs b/MCGalaxy/Player/TabList.cs
index 32742b3ac..02ed29898 100644
--- a/MCGalaxy/Player/TabList.cs
+++ b/MCGalaxy/Player/TabList.cs
@@ -40,7 +40,7 @@ namespace MCGalaxy {
/// Gets the name and the group name for the given player.
public static void GetEntry(Player p, Player dst, out string name, out string group) {
string col = Entities.GetSupportedCol(dst, p.color);
- group = Server.TablistGlobal ? "On " + p.level.name : "&fPlayers";
+ group = Server.TablistGlobal ? "On " + p.level.name : "&fPlayers";
name = col + p.truename;
IGame game = p.level.CurrentGame();
if (game != null) game.GetTabName(p, dst, ref name, ref group);