|
|
|
@ -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)
|
|
|
|
|