From b90c69eead649e8485fc8a7c8fa2433df1ab41f9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 25 Jun 2016 14:21:13 -0700 Subject: [PATCH] ServiceBot: actually, make extra_channels network specific --- coremods/service_support.py | 2 +- utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coremods/service_support.py b/coremods/service_support.py index 93ec013..61cc2e7 100644 --- a/coremods/service_support.py +++ b/coremods/service_support.py @@ -50,7 +50,7 @@ def spawn_service(irc, source, command, args): # TODO: channels should be tracked in a central database, not hardcoded # in conf. - channels = set(irc.serverdata.get('channels', [])) | sbot.extra_channels + channels = set(irc.serverdata.get('channels', [])) | sbot.extra_channels.get(irc.name, set()) for chan in channels: irc.proto.join(u, chan) diff --git a/utils.py b/utils.py index 632ed20..73d2bbe 100644 --- a/utils.py +++ b/utils.py @@ -148,7 +148,7 @@ def getDatabaseName(dbname): class ServiceBot(): def __init__(self, name, default_help=True, default_request=False, default_list=True, - nick=None, ident=None, manipulatable=False, extra_channels=set()): + nick=None, ident=None, manipulatable=False, extra_channels=collections.defaultdict(set)): # Service name self.name = name