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
def do376(self, irc, msg):
msg = conf.supybot.networks.get(irc.network).channels.joins()
if msg:
irc.queueMsg(msg)
msgs = conf.supybot.networks.get(irc.network).channels.joins()
if msgs:
for msg in msgs:
irc.queueMsg(msg)
do422 = do377 = do376
def setFloodQueueTimeout(self, *args, **kwargs):

View File

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