From af3057dee01b38687880a40348883a291bf47e3f Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 10 Feb 2019 14:55:46 +0000 Subject: [PATCH] Don't send empty JOIN when we have no saved channels (channel_save.py) --- modules/channel_save.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/channel_save.py b/modules/channel_save.py index b7b0833f..4d92cdb4 100644 --- a/modules/channel_save.py +++ b/modules/channel_save.py @@ -3,7 +3,10 @@ from src import ModuleManager, utils class Module(ModuleManager.BaseModule): @utils.hook("received.numeric.001") def on_connect(self, event): - channels = event["server"].get_setting("autojoin", []) + channels = event["server"].get_setting("autojoin", []) + if not channels: + return + chan_keys = event["server"].get_setting("channel_keys", {}) channels_sorted = sorted(channels, key=lambda x: 0 if x in chan_keys else 1)