From 71f15adb4a6465955acdf9441386b9df0ffbb966 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Sun, 22 Jul 2012 15:42:56 +0400 Subject: [PATCH] regex_filter. immediately remove the rule. not need to restart gajim. --- regex_filter/manifest.ini | 4 +--- regex_filter/regex_filter.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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]]