From 1191c7026fc830a4aa32099b76cf6831798ddf51 Mon Sep 17 00:00:00 2001 From: BtbN Date: Tue, 15 Aug 2023 19:18:20 +0200 Subject: [PATCH] Handle new non-numeric sasl events --- heisenbridge/network_room.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/heisenbridge/network_room.py b/heisenbridge/network_room.py index 664e8c6..ba89fc4 100644 --- a/heisenbridge/network_room.py +++ b/heisenbridge/network_room.py @@ -1494,8 +1494,10 @@ async def _connect(self) -> None: self.conn.send_items("AUTHENTICATE", base64.b64encode(sasl.encode("utf8")).decode("utf8")) else: self.conn.send_items("AUTHENTICATE", "+") - (connection, event) = await self.conn.expect(["903", "904", "908"]) - if event.type != "903": + (connection, event) = await self.conn.expect( + ["903", "904", "908", "saslsuccess", "saslfail", "saslmechs"] + ) + if event.type not in ["903", "saslsuccess"]: raise irc.client.ServerConnectionError(event.arguments[0]) except asyncio.TimeoutError: