From fba1dd2271392bd482ddf8f3fcdd1b023e4440b6 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 26 Nov 2018 17:34:27 +0000 Subject: [PATCH] Nope, just combine previous color-char and current color-char and see if it's less than or equal to 15 (utils.irc) --- src/utils/irc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/irc.py b/src/utils/irc.py index df04a885..d8609bf9 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -161,7 +161,7 @@ def _color_tokens(s: str) -> typing.List[str]: if can_add: current_color = background if is_background else foreground if current_color: - can_add = int(char) < 6 or int(current_color) < 2 + can_add = int(current_color + char) <= 15 if can_add: if is_background: