From 1c9c6908fbbe41bb1050ce04618b14093a1e685b Mon Sep 17 00:00:00 2001 From: Deathbybandaid Date: Thu, 2 May 2019 09:48:56 -0400 Subject: [PATCH 1/2] Set theme jekyll-theme-slate --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c741881 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-slate \ No newline at end of file From e70b1f5c20cbb49eb0dd516de9427bdc380d1efa Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 2 May 2019 10:17:44 -0400 Subject: [PATCH 2/2] Channels: Update configuration for channel JOIN ignoring --- sopel_modules/SpiceBot_Channels/Channels.py | 30 +++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/sopel_modules/SpiceBot_Channels/Channels.py b/sopel_modules/SpiceBot_Channels/Channels.py index 997a2f1..60bb0ce 100644 --- a/sopel_modules/SpiceBot_Channels/Channels.py +++ b/sopel_modules/SpiceBot_Channels/Channels.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals, absolute_import, print_function, divisi # sopel imports import sopel.module from sopel.tools import stderr -from sopel.config.types import StaticSection, ValidatedAttribute +from sopel.config.types import StaticSection, ValidatedAttribute, ListAttribute from sopel.module import OP, ADMIN, VOICE, OWNER, HALFOP HOP = HALFOP @@ -23,6 +23,7 @@ class SpiceBot_Channels_MainSection(StaticSection): announcenew = ValidatedAttribute('announcenew', default=False) joinall = ValidatedAttribute('joinall', default=False) operadmin = ValidatedAttribute('operadmin', default=False) + chanignore = ListAttribute('chanignore') def configure(config): @@ -30,6 +31,7 @@ def configure(config): config.SpiceBot_Channels.configure_setting('announcenew', 'SpiceBot_Channels Announce New Channels') config.SpiceBot_Channels.configure_setting('announcenew', 'SpiceBot_Channels JOIN New Channels') config.SpiceBot_Channels.configure_setting('announcenew', 'SpiceBot_Channels OPER ADMIN MODE') + config.SpiceBot_Channels.configure_setting('chanignore', 'SpiceBot_Channels Ignore JOIN for channels') def setup(bot): @@ -71,17 +73,20 @@ def trigger_channel_list_initial(bot, trigger): # JOIN if bot.config.SpiceBot_Channels.joinall: for channel in bot.memory['SpiceBot_Channels']['channels'].keys(): - if channel not in bot.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(): bot.write(('SAJOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name'])) # Chan ADMIN +a for channel in bot.channels.keys(): - if bot.config.SpiceBot_Channels.operadmin: - if not bot.channels[channel].privileges[bot.nick] < ADMIN: - bot.write(('SAMODE', channel, "+a", bot.nick)) - channel_privs(bot, channel) + if channel not in bot.config.SpiceBot_Channels.chanignore: + if bot.config.SpiceBot_Channels.operadmin: + if not bot.channels[channel].privileges[bot.nick] < ADMIN: + bot.write(('SAMODE', channel, "+a", bot.nick)) + channel_privs(bot, channel) + else: + bot.part(channel) if "*" in bot.memory['SpiceBot_Channels']['channels']: del bot.memory['SpiceBot_Channels']['channels']["*"] @@ -104,17 +109,20 @@ def trigger_channel_list_initial(bot, trigger): # JOIN if bot.config.SpiceBot_Channels.joinall: for channel in bot.memory['SpiceBot_Channels']['channels'].keys(): - if channel not in bot.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(): bot.write(('SAJOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name'])) # Chan ADMIN +a for channel in bot.channels.keys(): - if bot.config.SpiceBot_Channels.operadmin: - if not bot.channels[channel].privileges[bot.nick] < ADMIN: - bot.write(('SAMODE', channel, "+a", bot.nick)) - channel_privs(bot, channel) + if channel not in bot.config.SpiceBot_Channels.chanignore: + if bot.config.SpiceBot_Channels.operadmin: + if not bot.channels[channel].privileges[bot.nick] < ADMIN: + bot.write(('SAMODE', channel, "+a", bot.nick)) + channel_privs(bot, channel) + else: + bot.part(channel) if "*" in bot.memory['SpiceBot_Channels']['channels']: del bot.memory['SpiceBot_Channels']['channels']["*"]