Skip to content

Commit

Permalink
Fix IRC bold/italic/underline formatting chars not being stripped.
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Nov 28, 2017
1 parent 7d77a67 commit ece144e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fCraft/System/Utils/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit ece144e

Please sign in to comment.