diff --git a/regex_filter/manifest.ini b/regex_filter/manifest.ini index 76a2882..ddd353e 100644 --- a/regex_filter/manifest.ini +++ b/regex_filter/manifest.ini @@ -1,9 +1,7 @@ [info] name: Regex Filter short_name: regex_filter -version: 0.1 +version: 0.2 description: Filter incoming messages using regex. authors: Yann Leboulanger homepage: http://gajim.org - - diff --git a/regex_filter/regex_filter.py b/regex_filter/regex_filter.py index 6a4f818..a8686bf 100644 --- a/regex_filter/regex_filter.py +++ b/regex_filter/regex_filter.py @@ -47,7 +47,6 @@ class RegexFilterPlugin(GajimPlugin): 'gc-message-received': (ged.PREGUI1, self._nec_gc_message_received), } - self.rules = {} self.create_rules() @log_calls('RegexFilterPlugin') @@ -60,6 +59,7 @@ class RegexFilterPlugin(GajimPlugin): @log_calls('RegexFilterPlugin') def create_rules(self): + self.rules = {} for num, c in self.config.items(): self.rules[int(num)] = [re.compile(c[0], re.MULTILINE), c[1]]