Exemple #1
0
    def load(self, ctx):
        if not Actions.attrs:
            self.action_simple = {}

            with open('data/actions_simple.yaml') as f:
                simple = ordered_load(f.read())

            for k, v in simple.items():
                self.register_action(k, v)
        else:
            self.action_simple = ctx['action_simple']

        self.debounce = ctx.get('debounce',
                                defaultdict(lambda: defaultdict(dict)))
        self.hushed = {}
        self.pumps = {}

        super(ModLogPlugin, self).load(ctx)
Exemple #2
0
    def load(self, ctx):
        if not Actions.attrs:
            self.action_simple = {}

            with open('data/actions_simple.yaml') as f:
                simple = ordered_load(f.read())

            for k, v in simple.items():
                self.register_action(k, v)
        else:
            self.action_simple = ctx['action_simple']

        self.debounces = ctx.get('debounces') or DebouncesCollection()

        # Tracks modlogs that are silenced
        self.hushed = {}

        # Tracks pumps for all modlogs
        self.pumps = {}

        super(ModLogPlugin, self).load(ctx)