aboutsummaryrefslogtreecommitdiff
path: root/modules/channel_save.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-07-02 11:09:22 +0100
committerGravatar jesopo2018-07-02 11:09:22 +0100
commit3c138c1d1865c6aee1f1b7edd8edbac86f8763cd (patch)
tree465c931abe0737f8014babdbbeac414339d8862a /modules/channel_save.py
parentOMDBAPI now needs an api key (diff)
signature
If BitBot is kicked from a channel, remove from channel_save
Diffstat (limited to 'modules/channel_save.py')
-rw-r--r--modules/channel_save.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/channel_save.py b/modules/channel_save.py
index 35a62626..5234e168 100644
--- a/modules/channel_save.py
+++ b/modules/channel_save.py
@@ -31,3 +31,8 @@ class Module(object):
event["server"].send_join(
",".join(channels_sorted), ",".join(keys_sorted))
+ def on_kick(self, event):
+ channels = event["server"].get_setting("autojoin", [])
+ if event["channel"].name in channels:
+ channels.remove(event["channel"].name)
+ event["server"].set_setting("autojoin", channels)