From 905abf46f0f23a6aa86a2a50d66f2df1c7b4e4d1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 5 Sep 2019 15:16:18 +0100 Subject: [PATCH] automatically PART blacklisted channels if we join them (SAJOIN e.g.) --- modules/channel_blacklist.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/channel_blacklist.py b/modules/channel_blacklist.py index e3e2d1f5..be9f9d97 100644 --- a/modules/channel_blacklist.py +++ b/modules/channel_blacklist.py @@ -33,3 +33,8 @@ class Module(ModuleManager.BaseModule): keys = [c[1] for c in channels_out if c[1]] event["line"].args[0] = ",".join(channels) event["line"].args[1:] = keys + + @utils.hook("received.join") + def on_join(self, event): + if event["channel"].get_setting("blacklist", False): + event["channel"].send_part()