aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http2irc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/http2irc.py b/http2irc.py
index 8037cb7..da47dc2 100644
--- a/http2irc.py
+++ b/http2irc.py
@@ -632,7 +632,7 @@ class IRCClientProtocol(asyncio.Protocol):
# IRCv3 and SASL
elif line.command == 'CAP':
if line.params[1] == 'ACK':
- for cap in line.params[2].split(' '):
+ for cap in line.params[2].strip(' ').split(' '):
self.logger.debug(f'CAP ACK: {cap}')
self.caps.add(cap)
if cap == 'sasl' and self.sasl:
@@ -641,7 +641,7 @@ class IRCClientProtocol(asyncio.Protocol):
self.capReqsPending.remove(cap)
elif line.params[1] == 'NAK':
self.logger.warning(f'Failed to activate CAP(s): {line.params[2]}')
- for cap in line.params[2].split(' '):
+ for cap in line.params[2].strip(' ').split(' '):
self.capReqsPending.remove(cap)
if len(self.capReqsPending) == 0:
self.send(b'CAP END')