Fix custom colors not showing in line wrapped messages.

This commit is contained in:
UnknownShadow200 2016-01-31 19:03:13 +11:00
parent 8ace49f9ed
commit f28582a1e9

View File

@ -2675,16 +2675,14 @@ Next: continue;
if ( index != -1 ) {
if ( index < lines[lines.Count - 1].Length - 1 ) {
char next = lines[lines.Count - 1][index + 1];
if ( "0123456789abcdef".IndexOf(next) != -1 ) { color = "&" + next; }
if ( Colors.MapColor(ref next) ) color = "&" + next;
if ( index == lines[lines.Count - 1].Length - 1 ) {
lines[lines.Count - 1] = lines[lines.Count - 1].Substring(0, lines[lines.Count - 1].Length - 2);
}
}
else if ( message.Length != 0 ) {
char next = message[0];
if ( "0123456789abcdef".IndexOf(next) != -1 ) {
color = "&" + next;
}
if ( Colors.MapColor(ref next) ) color = "&" + next;
lines[lines.Count - 1] = lines[lines.Count - 1].Substring(0, lines[lines.Count - 1].Length - 1);
message = message.Substring(1);
}