Beispiel #1
0
    def __init__(self,
                 fallback_nicknames=[],
                 username=None,
                 realname=None,
                 **kwargs):
        super(BotBot, self).__init__("botbot-defaultnickname",
                                     fallback_nicknames=fallback_nicknames,
                                     username=username,
                                     realname=realname,
                                     **kwargs)
        self.config = None
        self.join_channels = None
        self.trigger = None
        self.config_location = None
        self.plugin_mgr = None
        self.commands = {}
        self.channel_hooks = []
        self.periodic_tasks = []
        self.ignored_users = set()

        self.event_loop = EventLoop()
        self.webapp, self.webserver = setup_webserver(self)
        self.webapp._ctx = self
        self.webserver_listening = False
        self.sentry = None
Beispiel #2
0
    def __init__(self, config_file="config.yml"):
        self.services = {}
        self.clients = {}
        self.event_loop = EventLoop()

        self.config_class = _config_class_factory(self)
        self.config_file = config_file

        self.stopping = False

        self.rehash()
        self._connect_to_db()
Beispiel #3
0
    def __init__(self, config, fallback_nicknames=[], username=None, realname=None, **kwargs):
        super(BotBot, self).__init__(config['IRC']['nick'],
                                     fallback_nicknames=fallback_nicknames,
                                     username=username,
                                     realname=realname,
                                     **kwargs)
        self.join_channels = config['IRC']['channel'].split()
        self.trigger = config['IRC']['trigger']
        self.config = config
        self.commands = {}
        self.pm_commands = {}
        self.channel_hooks = []
        self.ignored_users = set()

        self.event_loop = EventLoop()