def db_init(db, bot):
"check to see that our db has the the seen table and return a connection."
try:
db.execute("create table if not exists seen(name, time, quote, chan, host, primary key(name, chan))")
except:
for botcon in bot.conns:
bot.conns[botcon].cmd("QUIT", ["Restarted"])
time.sleep(5)
#os.execl("./bot", "bot", "restart")
args = sys.argv[:]
args.insert(0, sys.executable)
os.execv(sys.executable, args)
db.commit()
db_ready = True
评论列表
文章目录