diff --git a/MCGalaxy/Database/Stats/OnlineStat.cs b/MCGalaxy/Database/Stats/OnlineStat.cs index 37d6b6748..69b495cd8 100644 --- a/MCGalaxy/Database/Stats/OnlineStat.cs +++ b/MCGalaxy/Database/Stats/OnlineStat.cs @@ -44,7 +44,7 @@ namespace MCGalaxy.DB { }; static void OnlineCoreLine(Player p, Player who) { - string prefix = who.title.Length == 0 ? "" : who.color + "[" + who.titlecolor + who.title + who.color + "] "; + string prefix = who.title.Length == 0 ? "" : who.MakeTitle(who.title, who.titlecolor); string fullName = prefix + who.ColoredName; CoreLine(p, fullName, who.name, who.group, who.TotalMessagesSent); } diff --git a/MCGalaxy/Player/Player.cs b/MCGalaxy/Player/Player.cs index e56be8719..02ed2ebfc 100644 --- a/MCGalaxy/Player/Player.cs +++ b/MCGalaxy/Player/Player.cs @@ -129,11 +129,13 @@ namespace MCGalaxy { bool isMod = Server.Mods.CaselessContains(truename); bool devPrefix = ServerConfig.SoftwareStaffPrefixes; - string viptitle = - (devPrefix && isMod) ? string.Format("{0}[&aInfo{0}] ", color) : - (devPrefix && isDev) ? string.Format("{0}[&9Dev{0}] ", color) : ""; - prefix += viptitle; - prefix = (title.Length == 0) ? prefix : prefix + color + "[" + titlecolor + title + color + "] "; + if (devPrefix && isMod) prefix += MakeTitle("Info", "&a"); + if (devPrefix && isDev) prefix += MakeTitle("Dev", "&9"); + if (title.Length > 0) prefix += MakeTitle(title, titlecolor); + } + + internal string MakeTitle(string title, string titleCol) { + return color + "[" + titleCol + title + color + "] "; } public bool CheckIfInsideBlock() {