fix join command issue #41

pull/74/head
Mallory Hancock 2019-09-30 11:35:35 -07:00
parent a98c82b332
commit ff3520f8fd
1 changed files with 9 additions and 4 deletions

View File

@ -125,12 +125,17 @@ class Bot(irc.bot.SingleServerIRCBot):
else: else:
op = False op = False
if cmd == self.cmd_prefix + 'join' and op: if cmd == self.cmd_prefix + 'join' and op:
c.join(*arg.split()) try:
self.logger.info('joining {} per request of {}'.format(arg, nick)) c.join(*arg.split())
output = self.output_message('{}: joined {}'.format(nick, arg.split()[0])) self.logger.info('joining {} per request of {}'.format(arg, nick))
output = self.output_message('{}: joined {}'.format(nick, arg.split()[0]))
except:
self.logger.exception('issue with join command: {}join #channel <channel key>'.format(self.cmd_prefix))
elif cmd == self.cmd_prefix + 'quit' and op: elif cmd == self.cmd_prefix + 'quit' and op:
self.logger.info('quitting per request of {}'.format(nick)) self.logger.info('quitting per request of {}'.format(nick))
c.quit("See y'all later!") if not arg:
arg = "See y'all later!"
c.quit(arg)
quit() quit()
elif cmd == self.cmd_prefix + 'help': elif cmd == self.cmd_prefix + 'help':
self.call_help(nick, op) self.call_help(nick, op)