Use Colors.StripUsed instead of Colors.Strip in more places such as /who,/clients, name filter, etc

This commit is contained in:
UnknownShadow200 2020-11-28 22:46:50 +11:00
parent 3bbfe03789
commit 5869a4437d
6 changed files with 6 additions and 6 deletions

View File

@ -98,7 +98,7 @@ namespace MCGalaxy.Gui.Components {
if (dateStamp) AppendColoredText(CurrentDate, Color.Gray);
if (!Colorize) {
AppendText(Colors.Strip(text));
AppendText(Colors.StripUsed(text));
} else {
AppendFormatted(text, color);
}

View File

@ -78,7 +78,7 @@ namespace MCGalaxy.Gui.Popups {
CompilerResults result = engine.Compile(fileName, args, p);
if (result.Errors.HasErrors) {
string body = "\r\n\r\n" + Colors.Strip(p.Messages);
string body = "\r\n\r\n" + Colors.StripUsed(p.Messages);
Popup.Error("Compilation error. See logs/errors/compiler.log for more details." + body);
return;
}

View File

@ -118,7 +118,7 @@ namespace MCGalaxy {
return count.ToString();
}
static string TokenName(Player p) { return (Server.Config.DollarNames ? "$" : "") + Colors.Strip(p.DisplayName); }
static string TokenName(Player p) { return (Server.Config.DollarNames ? "$" : "") + Colors.StripUsed(p.DisplayName); }
static string TokenTrueName(Player p) { return (Server.Config.DollarNames ? "$" : "") + p.truename; }
static string TokenColor(Player p) { return p.color; }
static string TokenRank(Player p) { return p.group.Name; }

View File

@ -29,7 +29,7 @@ namespace MCGalaxy.Commands.Chatting {
if (message.Length == 0) { p.Message("You"); return; }
if (p.joker) { p.Message("Cannot use /me while jokered."); return; }
string msg = p.color + "*" + Colors.Strip(p.DisplayName) + " " + message;
string msg = p.color + "*" + Colors.StripUsed(p.DisplayName) + " " + message;
if (TryMessage(p, msg))
OnPlayerActionEvent.Call(p, PlayerAction.Me, message);
}

View File

@ -49,7 +49,7 @@ namespace MCGalaxy.Commands.Info {
List<Player> players = kvp.Value;
for (int i = 0; i < players.Count; i++) {
string nick = Colors.Strip(p.FormatNick(players[i]));
string nick = Colors.StripUsed(p.FormatNick(players[i]));
builder.Append(nick);
if (i < players.Count - 1) builder.Append(", ");
}

View File

@ -76,7 +76,7 @@ namespace MCGalaxy.Commands.Info {
StringBuilder data = list.builder;
data.Append(' ');
if (p.voice) { data.Append("&f+").Append(list.group.Color); }
data.Append(Colors.Strip(target.FormatNick(p)));
data.Append(Colors.StripUsed(target.FormatNick(p)));
if (p.hidden) data.Append("-hidden");
if (p.muted) data.Append("-muted");