4
0
mirror of https://github.com/jesopo/ircrobots synced 2024-06-18 22:07:05 +00:00

handle ERR_UNAVAILRESOURCE for prereg NICK failure too

This commit is contained in:
jesopo 2022-01-16 15:24:22 +00:00
parent b7019d35c1
commit 80b941fa53

View File

@ -181,9 +181,9 @@ class Server(IServer):
self._pending_who[0] == chan): self._pending_who[0] == chan):
self._pending_who.popleft() self._pending_who.popleft()
await self._next_who() await self._next_who()
elif (line.command in {
elif (line.command in {ERR_NICKNAMEINUSE, ERR_ERRONEUSNICKNAME} and ERR_NICKNAMEINUSE, ERR_ERRONEUSNICKNAME, ERR_UNAVAILRESOURCE
not self.registered): } and not self.registered):
if self._alt_nicks: if self._alt_nicks:
nick = self._alt_nicks.pop(0) nick = self._alt_nicks.pop(0)
await self.send(build("NICK", [nick])) await self.send(build("NICK", [nick]))