瀏覽代碼

Crash loudly if an IRC message is too long despite all the checks and splits

master
JustAnotherArchivist 4 年之前
父節點
當前提交
843775e948
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      http2irc.py

+ 2
- 0
http2irc.py 查看文件

@@ -353,6 +353,8 @@ class IRCClientProtocol(asyncio.Protocol):

def send(self, data):
self.logger.debug(f'Send: {data!r}')
if len(data) > 510:
raise RuntimeError(f'IRC message too long ({len(data)} > 510): {data!r}')
self.transport.write(data + b'\r\n')

async def _get_message(self):


Loading…
取消
儲存