If BitBot is kicked from a channel, remove from channel_save

This commit is contained in:
jesopo 2018-07-02 11:09:22 +01:00
parent 464510cd80
commit 3c138c1d18

View file

@ -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)