home
·
contact
·
privacy
projects
/
ircplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a431cce
)
Handle CAP NEW and CAP DEL.
master
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 4 Aug 2025 17:38:13 +0000
(19:38 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 4 Aug 2025 17:38:13 +0000
(19:38 +0200)
ircplom/client.py
patch
|
blob
|
history
diff --git
a/ircplom/client.py
b/ircplom/client.py
index 97d07866696b6e305a0c1c19ad4f1bb37a8b9dca..9c679c6ef0d4e32209bdd20f4e6a1f7df70be1dc 100644
(file)
--- 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.'
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 []
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)
match params[0]:
case 'LS' | 'LIST':
self._collect_caps(params)