diff --git a/bot.py b/bot.py index dc733e1..c6a6ec4 100644 --- a/bot.py +++ b/bot.py @@ -66,7 +66,6 @@ class TwitchBot(irc.bot.SingleServerIRCBot): self.server = config['IRC'].get('server', 'irc.chat.twitch.tv') self.port = config['IRC'].getint('port', 6667) self.nickname = config['IRC'].get('nickname') - self.channel = '#{0}'.format(config['IRC'].get('channel')) self.token = config['Twitch'].get('token') self.master_user_id = config['Twitch'].getint('master_user_id') self.api_url = config['Quotes'].get('api_url') @@ -94,8 +93,10 @@ class TwitchBot(irc.bot.SingleServerIRCBot): connection.cap('REQ', ':twitch.tv/membership') connection.cap('REQ', ':twitch.tv/tags') connection.cap('REQ', ':twitch.tv/commands') - log.info('Joining %s', self.channel) - connection.join(self.channel) + for channel in config['IRC'].get('channels').split(','): + channel = '#{0}'.format(channel) + log.info('Joining %s', channel) + connection.join(channel) def on_join(self, connection, event): log.info('Joined %s', event.target) diff --git a/settings.cfg.example b/settings.cfg.example index c8979c8..9d2b0cc 100644 --- a/settings.cfg.example +++ b/settings.cfg.example @@ -2,7 +2,7 @@ server = irc.chat.twitch.tv port = 6667 nickname = spooky_lurker -channel = lilialil +channels = lilialil [Instagram] username = lilialovesgames