mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Fix traceback if bot is kicked immediately after joining a channel.
This commit is contained in:
parent
3bfa4ae35a
commit
9bfec720f5
@ -518,8 +518,14 @@ class IrcState(IrcCommandDispatcher):
|
||||
def do367(self, irc, msg):
|
||||
# Example:
|
||||
# :server 367 user #chan some!random@user evil!channel@op 1356276459
|
||||
state = self.channels[msg.args[1]]
|
||||
state.bans.add(msg.args[2])
|
||||
try:
|
||||
state = self.channels[msg.args[1]]
|
||||
except KeyError:
|
||||
# We have been kicked of the channel before the server replied to
|
||||
# the MODE +b command.
|
||||
pass
|
||||
else:
|
||||
state.bans.add(msg.args[2])
|
||||
|
||||
def doMode(self, irc, msg):
|
||||
channel = msg.args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user