aboutsummaryrefslogtreecommitdiff
path: root/modules/channel_blacklist.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-05 15:16:18 +0100
committerGravatar jesopo2019-09-05 15:16:18 +0100
commit905abf46f0f23a6aa86a2a50d66f2df1c7b4e4d1 (patch)
treeb6dd40470b335e65b143446e8102b8f07e6ac649 /modules/channel_blacklist.py
parentuse tweet_mode="extended" for !tw user_timeline() calls too (diff)
signature
automatically PART blacklisted channels if we join them (SAJOIN e.g.)
Diffstat (limited to 'modules/channel_blacklist.py')
-rw-r--r--modules/channel_blacklist.py5
1 files changed, 5 insertions, 0 deletions
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()