|
|
|
|
@ -87,7 +87,11 @@ public static String parseIrcMessage(final String text)
|
|
|
|
|
case ControlChar.ColorFormat.CODE:
|
|
|
|
|
// first parse foreground color code
|
|
|
|
|
Color foreground = parseForegroundColor(text.substring(i + 1));
|
|
|
|
|
if (foreground != null)
|
|
|
|
|
if (foreground == null)
|
|
|
|
|
{
|
|
|
|
|
builder.cancel(ControlChar.ColorFormat.class, false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
i += 2;
|
|
|
|
|
Color background =
|
|
|
|
|
@ -99,10 +103,6 @@ public static String parseIrcMessage(final String text)
|
|
|
|
|
builder.apply(new ControlChar.ColorFormat(foreground,
|
|
|
|
|
background));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
builder.cancel(ControlChar.ColorFormat.class, false);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ControlChar.Normal.CODE:
|
|
|
|
|
builder.cancelAll();
|
|
|
|
|
|