Ignore leading zeros when filtering color codes
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 Apr 2015 17:21:55 +0000 (19:21 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 Apr 2015 17:21:55 +0000 (19:21 +0200)
src/main/java/net/pterodactylus/irc/util/MessageCleaner.java

index 160811e..33bde94 100644 (file)
@@ -94,6 +94,8 @@ public class MessageCleaner {
                                if (inColorCode == 1) {
                                        if ((c < '0') || (c > '9')) {
                                                inColorCode = 0;
+                                       } else if (c == '0') {
+                                               continue;
                                        } else {
                                                if (c == '9') {
                                                        inColorCode = 8;