From e1c81efa6f9a0eff6adb38bc67a117eb03fad5c7 Mon Sep 17 00:00:00 2001 From: jesopo <github@lolnerd.net> Date: Tue, 12 Feb 2019 15:34:50 +0000 Subject: [PATCH] Add a way to blacklist CAPs per-network (line_handler.py) --- modules/line_handler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/line_handler.py b/modules/line_handler.py index 3f6c880c..6a4c1a10 100644 --- a/modules/line_handler.py +++ b/modules/line_handler.py @@ -306,6 +306,10 @@ class Module(ModuleManager.BaseModule): if not is_multiline: matched_caps = self._match_caps( list(event["server"].server_capabilities.keys())) + blacklisted_caps = event["server"].get_setting( + "blacklisted-caps", []) + matched_caps = list( + set(matched_caps)-set(blacklisted_caps)) event["server"].queue_capabilities(matched_caps)