aboutsummaryrefslogtreecommitdiff
path: root/src/utils/irc.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-16 12:42:45 +0000
committerGravatar jesopo2019-01-16 12:42:45 +0000
commit4c5af0845c6a48bc059c02894f0fcf4b10ef0733 (patch)
tree1378f75116fc7b193debdc604058df56223a838f /src/utils/irc.py
parentDon't ignore a color code when it's right at the end of a message (diff)
signature
output of `len()` needs to have a `-1` on it when matching it against indexes
within the given string (src/utils/irc.py)
Diffstat (limited to 'src/utils/irc.py')
-rw-r--r--src/utils/irc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/irc.py b/src/utils/irc.py
index 25c170dd..f344d6f2 100644
--- a/src/utils/irc.py
+++ b/src/utils/irc.py
@@ -161,7 +161,7 @@ def _format_tokens(s: str) -> typing.List[str]:
matches = [] # type: typing.List[str]
for i, char in enumerate(s):
- last_char = i == len(s)
+ last_char = i == len(s)-1
if is_color:
can_add = False
current_color = background if is_background else foreground