3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

clientbot: ignore RPL_ENDOFBANLIST (368) responses for removed channels

This commit is contained in:
James Lu 2018-06-15 02:18:20 -07:00
parent c3bb0f7aca
commit 040b009fcb

View File

@ -1119,9 +1119,13 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
""" """
# <- :irc3.lose-the-game.nat 368 james #test :End of Channel Ban List # <- :irc3.lose-the-game.nat 368 james #test :End of Channel Ban List
channel = args[1] channel = args[1]
if channel not in self.channels:
return
modes = [('+%s' % banmode, m[1]) for m in self.channels[channel].modes if m[0] == banmode]
# Send out the hook. We don't worry about repeats since these modes don't need to be # Send out the hook. We don't worry about repeats since these modes don't need to be
# enumerated more than once per JOIN anyways. # enumerated more than once per JOIN anyways.
modes = [('+%s' % banmode, m[1]) for m in self.channels[channel].modes if m[0] == banmode]
if modes: if modes:
return {'target': channel, 'parse_as': 'MODE', return {'target': channel, 'parse_as': 'MODE',
'modes': modes} 'modes': modes}