mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
irclib: Prevent crash if 324 or 329 is not received after any other post-join messages.
This commit is contained in:
parent
359d3c633d
commit
677f7fdd6f
@ -532,7 +532,11 @@ class IrcState(IrcCommandDispatcher):
|
||||
|
||||
def do324(self, irc, msg):
|
||||
channel = msg.args[1]
|
||||
chan = self.channels[channel]
|
||||
try:
|
||||
chan = self.channels[channel]
|
||||
except KeyError:
|
||||
chan = ChannelState()
|
||||
self.channels[channel] = chan
|
||||
for (mode, value) in ircutils.separateModes(msg.args[2:]):
|
||||
modeChar = mode[1]
|
||||
if mode[0] == '+' and mode[1] not in 'ovh':
|
||||
@ -543,7 +547,11 @@ class IrcState(IrcCommandDispatcher):
|
||||
def do329(self, irc, msg):
|
||||
# This is the last part of an empty mode.
|
||||
channel = msg.args[1]
|
||||
chan = self.channels[channel]
|
||||
try:
|
||||
chan = self.channels[channel]
|
||||
except KeyError:
|
||||
chan = ChannelState()
|
||||
self.channels[channel] = chan
|
||||
chan.created = int(msg.args[2])
|
||||
|
||||
def doPart(self, irc, msg):
|
||||
|
Loading…
Reference in New Issue
Block a user