Skip to content

Commit

Permalink
Handle new non-numeric sasl events
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN authored and hifi committed Aug 15, 2023
1 parent 73435c9 commit 1191c70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions heisenbridge/network_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1191c70

Please sign in to comment.