Procházet zdrojové kódy

Gracefully handle channel bans and other join errors

master
JustAnotherArchivist před 2 roky
rodič
revize
86301905a6
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. +6
    -2
      http2irc.py

+ 6
- 2
http2irc.py Zobrazit soubor

@@ -655,8 +655,12 @@ class IRCClientProtocol(asyncio.Protocol):
ircstates.numerics.ERR_BANNEDFROMCHAN,
ircstates.numerics.ERR_BADCHANNELKEY,
):
self.logger.error(f'Failed to join channel: {message!r}, terminating connection')
self.transport.close()
self.logger.error(f'Failed to join channel {line.params[1]}: {message!r}')
errChannel = self.server.casefold(line.params[1])
for channel in self.channels:
if self.server.casefold(channel) == errChannel:
self.channels.remove(channel)
break

# PART errors
elif line.command == '442':


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