From b2f3c0d06984b142d64146fb66e71fa27f94c608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 14 Aug 2020 01:13:12 +0200 Subject: plugins/untrackme: docstring to map_services method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/untrackme.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins') diff --git a/plugins/untrackme.py b/plugins/untrackme.py index 841e2d90..5256edad 100644 --- a/plugins/untrackme.py +++ b/plugins/untrackme.py @@ -75,6 +75,13 @@ class Plugin(BasePlugin): self.api.add_event_handler('private_msg', self.handle_msg) def map_services(self, match: re.Match) -> str: + """ + If it matches a host that we know about, change the domain for the + alternative service. Some hosts needs to be proxied instead (such + as twitter pictures), so they're url encoded and appended to the + proxy service. + """ + host = match.group('host') dest = SERVICES.get(host) -- cgit v1.2.3