def main(): signal.signal(signal.SIGINT, terminate) log.set_loglevel(2) log.init_logfile("logs") log.i('Loading configuration file "bot.conf"') conf = BotConf("bot.conf") log.i("Connecting Bot.") log.i("Server: %s" % conf.server) log.i("Port : %d" % conf.port) session = IrcSession(conf) session.run() log.i("Exiting.")
def terminate(signal, frame): log.i("Exiting.") sys.exit(0)