fix join command issue #41
parent
a98c82b332
commit
ff3520f8fd
|
@ -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:
|
||||||
|
try:
|
||||||
c.join(*arg.split())
|
c.join(*arg.split())
|
||||||
self.logger.info('joining {} per request of {}'.format(arg, nick))
|
self.logger.info('joining {} per request of {}'.format(arg, nick))
|
||||||
output = self.output_message('{}: joined {}'.format(nick, arg.split()[0]))
|
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)
|
||||||
|
|
Loading…
Reference in New Issue