diff --git a/GUI/LineFormatter.cs b/GUI/LineFormatter.cs index d77b92396..b81faeff0 100644 --- a/GUI/LineFormatter.cs +++ b/GUI/LineFormatter.cs @@ -26,7 +26,8 @@ namespace MCGalaxy.Gui { public static void Format(string message, Action output) { int index = 0; char col = 'S'; - message = Colors.Escape(message); + message = message.Replace("%S", "&f"); // We want %S to be treated specially when displayed to GUI + message = Colors.Escape(message); // Need to Replace first, otherwise it's mapped by Colors.Escape while (index < message.Length) OutputPart(ref col, ref index, message, output); diff --git a/MCGalaxy/Chat/Colors.cs b/MCGalaxy/Chat/Colors.cs index c2c18d5fc..c73c54004 100644 --- a/MCGalaxy/Chat/Colors.cs +++ b/MCGalaxy/Chat/Colors.cs @@ -213,7 +213,7 @@ namespace MCGalaxy { while (len > 0 && chars[i] == '&') { len -= 2; i += 2; } // Starts with "http" ? - if (len < prefixLen) return false; + if (len < prefixLen) return false; if (chars[i] != 'h' || chars[i + 1] != 't' || chars[i + 2] != 't' || chars[i + 3] != 'p') return false; len -= 4; i += 4; @@ -228,7 +228,7 @@ namespace MCGalaxy { char c = chars[i]; bool validCode = c == '%' && i < chars.Length - 1; - if (!validCode) continue; + if (!validCode) continue; char color = chars[i + 1]; if (!Map(ref color)) continue;