From 1af821123ba18411e6fb7316214877a10cdbf237 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 5 Aug 2018 12:57:19 +0100 Subject: [PATCH] only set autojoin when we've joined a channel not in our autojoin list --- modules/channel_save.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/channel_save.py b/modules/channel_save.py index 4b6254f2..e8381ba8 100644 --- a/modules/channel_save.py +++ b/modules/channel_save.py @@ -26,9 +26,10 @@ class Module(object): ",".join(channels_sorted), ",".join(keys_sorted)) def on_join(self, event): - channels = set(event["server"].get_setting("autojoin", [])) - channels.add(event["channel"].name) - event["server"].set_setting("autojoin", list(channels)) + channels = event["server"].get_setting("autojoin", []) + if not event["channel"].name in channels: + channels.add(event["channel"].name) + event["server"].set_setting("autojoin", channels) def on_kick(self, event): channels = event["server"].get_setting("autojoin", [])