mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-18 08:02:51 +01:00
ServiceBot: actually, make extra_channels network specific
This commit is contained in:
parent
a0d1f627ec
commit
b90c69eead
@ -50,7 +50,7 @@ def spawn_service(irc, source, command, args):
|
|||||||
|
|
||||||
# TODO: channels should be tracked in a central database, not hardcoded
|
# TODO: channels should be tracked in a central database, not hardcoded
|
||||||
# in conf.
|
# 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:
|
for chan in channels:
|
||||||
irc.proto.join(u, chan)
|
irc.proto.join(u, chan)
|
||||||
|
2
utils.py
2
utils.py
@ -148,7 +148,7 @@ def getDatabaseName(dbname):
|
|||||||
|
|
||||||
class ServiceBot():
|
class ServiceBot():
|
||||||
def __init__(self, name, default_help=True, default_request=False, default_list=True,
|
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
|
# Service name
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user