Procházet zdrojové kódy

Handle prefixed messages from the server

master
JustAnotherArchivist před 4 roky
rodič
revize
86746f55a0
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. +3
    -0
      http2irc.py

+ 3
- 0
http2irc.py Zobrazit soubor

@@ -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 '):


Načítá se…
Zrušit
Uložit