Exemplo n.º 1
0
    def __init__(self):

        # Process and store command line arguments to self.opts
        self.optp_init()

        # Set config information
        self.bot_name = bot_name
        self.bot_master = bot_master
        self.default_load_command = default_load_command
        self.bot_cmd_prefix = bot_cmd_prefix
        self.brain_file = brain_file
        self.std_startup_file = std_startup_file

        # Activate LPU component to handle AI - Slow - do before XMPP
        self.lpu = NanoLogic(self.bot_name, self.bot_master, self.brain_file, self.std_startup_file, self.default_load_command)

        # Activate XMPP component and hand over control to XMPP stanza processing
        self.xmpp = NanoXMPP(self.opts.jid, self.opts.password, self.opts.room, self.opts.nick)

        # Activate Reddit bot component
        self.reddit = NanoReddit()