From: Christian Heller Date: Mon, 4 Aug 2025 17:38:13 +0000 (+0200) Subject: Handle CAP NEW and CAP DEL. X-Git-Url: https://plomlompom.com/repos/booking/static/%7B%7Bdb.prefix%7D%7D/condition_descriptions?a=commitdiff_plain;ds=inline;p=ircplom Handle CAP NEW and CAP DEL. --- diff --git a/ircplom/client.py b/ircplom/client.py index 97d0786..9c679c6 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -86,8 +86,12 @@ class _CapsManager: def process_msg(self, params: tuple[str, ...]) -> list[str]: 'Parse CAP params to negot. steps, DB inputs; once done return latter.' - if self._challenge_met('END'): + if params[0] in {'NEW', 'DEL'}: # don't bother fiddling, just re-do + self.clear() + self.challenge('LS', '302') return [] + if self._challenge_met('END'): + return [f'ignoring post-END CAP message not NEW, DEL: {params}'] match params[0]: case 'LS' | 'LIST': self._collect_caps(params)