mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
cleanup SetPrefix
This commit is contained in:
parent
342584335a
commit
6fcbf97f0b
@ -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);
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user