Don't send JOIN on connection if there is no channels to join.

This commit is contained in:
Valentin Lorentz 2013-07-14 09:44:34 +02:00
parent 8496cc2e6a
commit 21144f7c9c
2 changed files with 8 additions and 2 deletions

View File

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

View File

@ -289,7 +289,11 @@ class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
channels_with_key.append(channel)
else:
channels.append(channel)
return ircmsgs.joins(channels_with_key + channels, keys)
if channels_with_key or channels:
return ircmsgs.joins(channels_with_key + channels, keys)
else:
# Let's be explicit about it
return None
def registerNetwork(name, password='', ssl=False, sasl_username='',
sasl_password=''):