static string FormatNick(Player p, Player pl) { string flags = OnlineListEntry.GetFlags(pl); string format = flags.Length > 0 ? "**{0}**_{2}_ (`{1}`)" : "**{0}** (`{1}`)"; return(string.Format(format, p.FormatNick(pl), pl.level.name, flags)); }
static void Append(Player target, StringBuilder data, Player p, Group group) { data.Append(' '); if (p.voice) { data.Append("&f+").Append(group.Color); } data.Append(Colors.StripUsed(target.FormatNick(p))); data.Append(OnlineListEntry.GetFlags(p)); string lvl = Colors.Strip(p.level.name); // for museums data.Append(" (").Append(lvl).Append("),"); }
static string FormatNick(Player p, Player pl) { string flags = OnlineListEntry.GetFlags(pl); string format; if (flags.Length > 0) { format = BOLD + "{0}" + BOLD + ITALIC + "{2}" + ITALIC + " (" + CODE + "{1}" + CODE + ")"; } else { format = BOLD + "{0}" + BOLD + " (" + CODE + "{1}" + CODE + ")"; } return(string.Format(format, p.FormatNick(pl), // level name must not have _ escaped as the level name is in a code block - // otherwise the escaped "\_" actually shows as "\_" instead of "_" pl.level.name.Replace('_', UNDERSCORE), flags)); }