Exemplo n.º 1
0
def main():
    configure.setup_logs()

    try:
        config = configure.load_config()
    except IOError as e:
        log.critical("Aborting, problem loading config: {0}".format(e), exc_info=True)
        sys.exit(1)

    bot = TerminalBot(config)
    stdio.StandardIO(bot)

    reactor.run()
Exemplo n.º 2
0
def main():
    configure.setup_logs()
    # load config
    try:
        config = configure.load_config()
    except IOError as e:
        log.critical("Aborting, problem loading config: {0}".format(e), exc_info=True)
        sys.exit(1)

    # def shutdown():
    #     # add shutdown calls here...
    # reactor.addSystemEventTrigger('before', 'shutdown', shutdown)

    from twisted.internet import reactor

    factory = TwoBitBotFactory(config)

    reactor.connectTCP(config['server'], config['server_port'], factory)
    reactor.run()
Exemplo n.º 3
0
def main():
    configure.setup_logs()
    # load config
    try:
        config = configure.load_config()
    except IOError as e:
        log.critical("Aborting, problem loading config: {0}".format(e),
                     exc_info=True)
        sys.exit(1)

    # def shutdown():
    #     # add shutdown calls here...
    # reactor.addSystemEventTrigger('before', 'shutdown', shutdown)

    from twisted.internet import reactor

    factory = TwoBitBotFactory(config)

    reactor.connectTCP(config['server'], config['server_port'], factory)
    reactor.run()