mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Fix traceback if bot is kicked immediately after joining a channel.
This commit is contained in:
parent
3bfa4ae35a
commit
9bfec720f5
@ -518,7 +518,13 @@ class IrcState(IrcCommandDispatcher):
|
|||||||
def do367(self, irc, msg):
|
def do367(self, irc, msg):
|
||||||
# Example:
|
# Example:
|
||||||
# :server 367 user #chan some!random@user evil!channel@op 1356276459
|
# :server 367 user #chan some!random@user evil!channel@op 1356276459
|
||||||
|
try:
|
||||||
state = self.channels[msg.args[1]]
|
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])
|
state.bans.add(msg.args[2])
|
||||||
|
|
||||||
def doMode(self, irc, msg):
|
def doMode(self, irc, msg):
|
||||||
|
Loading…
Reference in New Issue
Block a user