This commit is contained in:
Nicolas Coevoet 2014-05-09 14:39:57 +02:00
parent 9210aa1a33
commit f9afcffb3a
2 changed files with 17 additions and 5 deletions

View File

@ -230,9 +230,10 @@ class Owner(callbacks.Plugin):
world.starting = False world.starting = False
def do376(self, irc, msg): def do376(self, irc, msg):
msg = conf.supybot.networks.get(irc.network).channels.joins() msgs = conf.supybot.networks.get(irc.network).channels.joins()
if msg: if msgs:
irc.queueMsg(msg) for msg in msgs:
irc.queueMsg(msg)
do422 = do377 = do376 do422 = do377 = do376
def setFloodQueueTimeout(self, *args, **kwargs): def setFloodQueueTimeout(self, *args, **kwargs):

View File

@ -276,6 +276,9 @@ class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
channels = [] channels = []
channels_with_key = [] channels_with_key = []
keys = [] keys = []
old = None
msgs = []
msg = None
for channel in self(): for channel in self():
key = self.key.get(channel)() key = self.key.get(channel)()
if key: if key:
@ -283,8 +286,16 @@ class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
channels_with_key.append(channel) channels_with_key.append(channel)
else: else:
channels.append(channel) channels.append(channel)
if channels_with_key or channels: msg = ircmsgs.joins(channels_with_key + channels, keys)
return ircmsgs.joins(channels_with_key + channels, keys) if len(str(msg)) > 512:
msgs.append(old)
keys = []
channels_with_key = []
channels = []
old = msg
if msg:
msgs.append(msg)
return msgs
else: else:
# Let's be explicit about it # Let's be explicit about it
return None return None