diff --git a/sopel_modules/SpiceBot_Channels/Channels.py b/sopel_modules/SpiceBot_Channels/Channels.py index 33c1b8d..6424166 100644 --- a/sopel_modules/SpiceBot_Channels/Channels.py +++ b/sopel_modules/SpiceBot_Channels/Channels.py @@ -133,7 +133,7 @@ def bot_part_empty(bot): ignorepartlist.append(bot.config.core.logging_channel) for channel in bot.channels.keys(): - if len(bot.channels[channel].privileges.keys()) == 1 and channel not in ignorepartlist: + if len(bot.channels[channel].privileges.keys()) == 1 and channel not in ignorepartlist and channel.startswith("#"): bot.part(channel, "Leaving Empty Channel") if channel.lower() in bot.memory['SpiceBot_Channels']['channels']: del bot.memory['SpiceBot_Channels']['channels'][channel.lower()] diff --git a/sopel_modules/SpiceBot_SBTools/__init__.py b/sopel_modules/SpiceBot_SBTools/__init__.py index e31439b..5fb5f94 100644 --- a/sopel_modules/SpiceBot_SBTools/__init__.py +++ b/sopel_modules/SpiceBot_SBTools/__init__.py @@ -273,21 +273,23 @@ def channel_privs(bot, channel, privtype): def join_all_channels(bot): if bot.config.SpiceBot_Channels.joinall: for channel in bot.memory['SpiceBot_Channels']['channels'].keys(): - if channel not in bot.channels.keys() and channel not in bot.config.SpiceBot_Channels.chanignore: - bot.write(('JOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name'])) - if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin: - bot.write(('SAJOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name'])) + if channel.startswith("#"): + if channel not in bot.channels.keys() and channel not in bot.config.SpiceBot_Channels.chanignore: + bot.write(('JOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name'])) + if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin: + bot.write(('SAJOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name'])) def chanadmin_all_channels(bot): # Chan ADMIN +a for channel in bot.channels.keys(): - if channel not in bot.config.SpiceBot_Channels.chanignore: - if bot.config.SpiceBot_Channels.operadmin: - if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN: - bot.write(('SAMODE', channel, "+a", bot.nick)) - else: - bot.part(channel) + if channel.startswith("#"): + if channel not in bot.config.SpiceBot_Channels.chanignore: + if bot.config.SpiceBot_Channels.operadmin: + if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN: + bot.write(('SAMODE', channel, "+a", bot.nick)) + else: + bot.part(channel) def channel_list_current(bot):