mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fixes ProgVal/Limnoria#611
This commit is contained in:
parent
9210aa1a33
commit
f9afcffb3a
@ -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):
|
||||
|
15
src/conf.py
15
src/conf.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user