From 21144f7c9c2446306723772df382dab8c44a511f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 14 Jul 2013 09:44:34 +0200 Subject: [PATCH] Don't send JOIN on connection if there is no channels to join. --- plugins/Owner/plugin.py | 4 +++- src/conf.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index 3bf90d689..56234b829 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -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): diff --git a/src/conf.py b/src/conf.py index 1121b1d4a..19d721549 100644 --- a/src/conf.py +++ b/src/conf.py @@ -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=''):