From 6c87e6d9f0e1da240c154a2e3e40b5d0b612dc9c Mon Sep 17 00:00:00 2001 From: Mal Hancock Date: Fri, 28 Dec 2018 11:20:52 -0800 Subject: [PATCH] fix for channel keys (#40) --- pinhook/bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pinhook/bot.py b/pinhook/bot.py index 1379a75..d5a7b4b 100644 --- a/pinhook/bot.py +++ b/pinhook/bot.py @@ -119,8 +119,8 @@ class Bot(irc.bot.SingleServerIRCBot): self.logger.info('identifying with nickserv') c.privmsg(self.nickserv, 'identify {}'.format(self.ns_pass)) for channel in self.chanlist: - self.logger.info('joining channel {}'.format(channel)) - c.join(channel) + self.logger.info('joining channel {}'.format(channel.split()[0])) + c.join(*channel.split()) def on_pubmsg(self, c, e): self.process_event(c, e) @@ -143,9 +143,9 @@ class Bot(irc.bot.SingleServerIRCBot): else: op = False if cmd == '!join' and op: - c.join(arg) + c.join(*arg.split()) self.logger.info('joining {} per request of {}'.format(arg, nick)) - output = self.output_message('{}: joined {}'.format(nick, arg)) + output = self.output_message('{}: joined {}'.format(nick, arg.split()[0])) elif cmd == '!quit' and op: self.logger.info('quitting per request of {}'.format(nick)) c.quit("See y'all later!")