Skip to content
Permalink
Browse files

Fix IRC bold/italic/underline formatting chars not being stripped.

  • Loading branch information...
UnknownShadow200 committed Nov 28, 2017
1 parent 7d77a67 commit ece144e7229cfb3cbe23767bc4a449706626fa41
Showing with 8 additions and 2 deletions.
  1. +8 −2 fCraft/System/Utils/Color.cs
@@ -349,8 +349,14 @@ public static string IrcToMinecraftColors([NotNull] string input)
{
sb.Replace(codePair.Value, codePair.Key);
}
sb.Replace("\u0003", White); // color reset
sb.Replace("\u000f", White); // reset

// trim misc formatting chars
sb.Replace("\x02", ""); // bold
sb.Replace("\x1D", ""); // italic
sb.Replace("\x1F", ""); // underline

sb.Replace("\x03", White); // color reset
sb.Replace("\x0f", White); // reset
return sb.ToString();
}

0 comments on commit ece144e

Please sign in to comment.
You can’t perform that action at this time.