From 1a9f9646128e075e7b1de6eb4428f8672aca64f5 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sat, 18 May 2019 14:57:56 -0400 Subject: [PATCH] abandon code for now --- sopel_modules/SpiceBot_Channels/Channels.py | 11 +++++++++-- .../SpiceBot_Logs/{IRC_Events.py => IRC_Events} | 0 sopel_modules/SpiceBot_Logs/__init__.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) rename sopel_modules/SpiceBot_Logs/{IRC_Events.py => IRC_Events} (100%) diff --git a/sopel_modules/SpiceBot_Channels/Channels.py b/sopel_modules/SpiceBot_Channels/Channels.py index ead0757..9de80e4 100644 --- a/sopel_modules/SpiceBot_Channels/Channels.py +++ b/sopel_modules/SpiceBot_Channels/Channels.py @@ -25,8 +25,8 @@ class SpiceBot_Channels_MainSection(StaticSection): def configure(config): config.define_section("SpiceBot_Channels", SpiceBot_Channels_MainSection, validate=False) 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('joinall', 'SpiceBot_Channels JOIN New Channels') + config.SpiceBot_Channels.configure_setting('operadmin', 'SpiceBot_Channels OPER ADMIN MODE') config.SpiceBot_Channels.configure_setting('chanignore', 'SpiceBot_Channels Ignore JOIN for channels') @@ -45,6 +45,13 @@ def shutdown(bot): del bot.memory["SpiceBot_Channels"] +@sopel.module.event(botevents.BOT_CONNECTED) +@sopel.module.rule('.*') +def unkickable_bot(bot, trigger): + if bot.config.SpiceBot_Channels.operadmin: + bot.write(('SAMODE', bot.nick, '+q')) + + @sopel.module.event(botevents.BOT_CONNECTED) @sopel.module.rule('.*') def trigger_channel_list_initial(bot, trigger): diff --git a/sopel_modules/SpiceBot_Logs/IRC_Events.py b/sopel_modules/SpiceBot_Logs/IRC_Events similarity index 100% rename from sopel_modules/SpiceBot_Logs/IRC_Events.py rename to sopel_modules/SpiceBot_Logs/IRC_Events diff --git a/sopel_modules/SpiceBot_Logs/__init__.py b/sopel_modules/SpiceBot_Logs/__init__.py index eace833..f6ef4d1 100644 --- a/sopel_modules/SpiceBot_Logs/__init__.py +++ b/sopel_modules/SpiceBot_Logs/__init__.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi from .Queue import * from .Logs_Command import * -from .IRC_Events import * +# from .IRC_Events import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net'