From: Christian Heller Date: Thu, 29 May 2025 10:56:48 +0000 (+0200) Subject: Minor fixes. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/conditions?a=commitdiff_plain;h=1b45a9d3af9d2a8555f4083a9a5f7b3df16589e1;p=ircplom Minor fixes. --- diff --git a/ircplom.py b/ircplom.py index e59af7a..fabf0a0 100755 --- a/ircplom.py +++ b/ircplom.py @@ -84,7 +84,7 @@ class Terminal: if len_with_offset > self.size.x: print(self._blessed.truncate(msg, self.size.x - offset.x), end='') else: - len_padding = self.size.x - len_with_offset# - 2 + len_padding = self.size.x - len_with_offset print(msg + (f' ' * len_padding), end='') def get_keypresses(self) -> Iterator[str]: @@ -196,7 +196,7 @@ class IrcMessage(NamedTuple): if '=' in str_tag: key, val = str_tag.split('=', maxsplit=1) for to_replace, replace_with in IRCSPEC_TAG_ESCAPES: - val.replace(to_replace, replace_with) + val = val.replace(to_replace, replace_with) else: key, val = str_tag, '' tags[key] = val @@ -218,7 +218,7 @@ class IrcMessage(NamedTuple): params[-1] += char return params - stages = [_Stage('tags', 'q', _parse_tags), + stages = [_Stage('tags', '@', _parse_tags), _Stage('source', ':'), _Stage('verb', None, lambda s: s.upper()), _Stage('parameters', None, _split_params)]