regex_filter. immediately remove the rule. not need to restart gajim.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user