Skip to content
Snippets Groups Projects
Commit 71f15adb authored by Dicson's avatar Dicson
Browse files

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

parent 83bbf335
No related branches found
No related tags found
No related merge requests found
[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
......@@ -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]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment