more updates :D

This commit is contained in:
Luke Rogers 2013-10-03 23:15:06 +13:00
parent c71ca0632a
commit 59890e740a
4 changed files with 28 additions and 13 deletions

View file

@ -3,6 +3,7 @@ from core import bot
import os
import sys
import time
import signal
# check python version
@ -27,8 +28,15 @@ def exit_gracefully(signum, frame):
original_sigint = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, exit_gracefully)
# create new bot object
cloudbot = bot.Bot()
# little restart loop
while True:
# create new bot object
cloudbot = bot.Bot()
# start the main loop
cloudbot.run()
cloudbot.run()
if cloudbot.do_restart:
# this kills the bot
# TODO: make it not just kill the bot
sys.exit()
else:
sys.exit()