fix !frestart not actually restarting the bot

This commit is contained in:
jacob1 2015-06-03 01:31:34 -04:00
parent 040be2ff31
commit d8bc216df4

View File

@ -581,8 +581,12 @@ def restart_program(cli, nick, chan, rest):
except Exception:
notify_error(cli, chan, errlog)
@hook("error")
def restart_buffer(*s):
@hook("quit")
def restart_buffer(cli, raw_nick, reason):
nick, _, __, cloak = parse_nick(raw_nick)
# restart the bot once our quit message goes though to ensure entire IRC queue is sent
# if the bot is using a nick that isn't botconfig.NICK, then stop breaking things and fdie
if nick == botconfig.NICK:
plog("RESTARTING")
python = sys.executable