aboutsummaryrefslogtreecommitdiff
path: root/http2irc.py
diff options
context:
space:
mode:
authorGravatar JustAnotherArchivist2019-12-15 15:37:30 +0000
committerGravatar JustAnotherArchivist2019-12-15 15:37:30 +0000
commit86746f55a06189a5a2bea0b846c5edf6a29cdd37 (patch)
tree3692f641b6bfa0e4237daeb63989cf1716d35d76 /http2irc.py
parentAdd CertFP support (diff)
signature
Handle prefixed messages from the server
Diffstat (limited to 'http2irc.py')
-rw-r--r--http2irc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/http2irc.py b/http2irc.py
index eec334a..d355ae4 100644
--- a/http2irc.py
+++ b/http2irc.py
@@ -303,6 +303,9 @@ class IRCClientProtocol(asyncio.Protocol):
def message_received(self, message):
logging.info(f'Message received: {message!r}')
+ if message.startswith(b':'):
+ # Prefixed message, extract command + parameters (the prefix cannot contain a space)
+ message = message.split(b' ', 1)[1]
if message.startswith(b'PING '):
self.send(b'PONG ' + message[5:])
elif message.startswith(b'PONG '):