regex_filter. immediately remove the rule. not need to restart gajim.

This commit is contained in:
Denis Fomin
2012-07-22 15:42:56 +04:00
parent 83bbf33534
commit 71f15adb4a
2 changed files with 2 additions and 4 deletions

View File

@@ -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 <asterix@lagaule.org>
homepage: http://gajim.org

View File

@@ -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]]