From 2a66ad1c44f442cf7d829b84174f9b553e527ce5 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 4 Aug 2025 19:38:13 +0200 Subject: [PATCH] Handle CAP NEW and CAP DEL. --- ircplom/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.30.2