Commit dc5ca6c8 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[regex_filter] Remove log calls

parent 75bacc7a
......@@ -24,7 +24,6 @@ Regex Filter plugin.
import re
from gajim.plugins import GajimPlugin
from gajim.plugins.helpers import log_calls
from gajim.common import app
from gajim.common import ged
......@@ -37,7 +36,6 @@ from gajim.plugins.plugins_i18n import _
class RegexFilterPlugin(GajimPlugin):
def init(self):
self.description = _('Filter messages with regex')
self.config_dialog = None
......@@ -49,21 +47,17 @@ class RegexFilterPlugin(GajimPlugin):
def activate(self):
def deactivate(self):
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]]
def add_rule(self, search, replace):
if self.rules:
num = max(self.rules.keys()) + 1
......@@ -72,7 +66,6 @@ class RegexFilterPlugin(GajimPlugin):
self.config[str(num)] = [search, replace]
def remove_rule(self, num):
if num in self.config:
del self.config[num]
......@@ -80,11 +73,9 @@ class RegexFilterPlugin(GajimPlugin):
return True
return False
def get_rules(self):
return self.config
def _nec_all(self, obj):
if not obj.msgtxt:
......@@ -93,11 +84,9 @@ class RegexFilterPlugin(GajimPlugin):
rule = self.rules[num]
obj.msgtxt = rule[0].sub(rule[1], obj.msgtxt)
def _on_message_received(self, obj):
def _on_gc_message_received(self, obj):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment