From f19016db964ca88589d4473c0e8ea49c97c4e685 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 31 May 2019 15:26:27 -0400 Subject: [PATCH] logs migrate --- sopel_modules/SpiceBot/setup.py | 4 ++++ .../Logs.py} | 6 +++++- sopel_modules/SpiceBot_Core_Commands/__init__.py | 1 + .../Logs.py} | 16 +++++----------- .../SpiceBot_Core_Processing/__init__.py | 1 + sopel_modules/SpiceBot_Logs/__init__.py | 9 --------- 6 files changed, 16 insertions(+), 21 deletions(-) rename sopel_modules/{SpiceBot_Logs/Logs_Command.py => SpiceBot_Core_Commands/Logs.py} (95%) rename sopel_modules/{SpiceBot_Logs/Queue.py => SpiceBot_Core_Processing/Logs.py} (73%) delete mode 100644 sopel_modules/SpiceBot_Logs/__init__.py diff --git a/sopel_modules/SpiceBot/setup.py b/sopel_modules/SpiceBot/setup.py index 93938fb..cc8c3a4 100644 --- a/sopel_modules/SpiceBot/setup.py +++ b/sopel_modules/SpiceBot/setup.py @@ -18,6 +18,10 @@ from .osd import SopelWrapperOSD, ToolsOSD, SopelOSD, SpiceBot_OSD def setup(bot): + logs.log('SpiceBot_Logs', "Starting Setup Procedure") + events.startup_add([events.BOT_LOGS]) + events.trigger(bot, events.BOT_LOGS, "SpiceBot_Logs") + # Inject OSD logs.log('SpiceBot_OSD', "Implanting OSD function into bot") bot.osd = SopelOSD.osd diff --git a/sopel_modules/SpiceBot_Logs/Logs_Command.py b/sopel_modules/SpiceBot_Core_Commands/Logs.py similarity index 95% rename from sopel_modules/SpiceBot_Logs/Logs_Command.py rename to sopel_modules/SpiceBot_Core_Commands/Logs.py index d170629..7eccb01 100644 --- a/sopel_modules/SpiceBot_Logs/Logs_Command.py +++ b/sopel_modules/SpiceBot_Core_Commands/Logs.py @@ -1,6 +1,10 @@ -# coding=utf-8 +# coding=utf8 from __future__ import unicode_literals, absolute_import, division, print_function +""" +This is the SpiceBot Logs System +""" +# sopel imports import sopel.module import spicemanip diff --git a/sopel_modules/SpiceBot_Core_Commands/__init__.py b/sopel_modules/SpiceBot_Core_Commands/__init__.py index 8858604..c23017e 100644 --- a/sopel_modules/SpiceBot_Core_Commands/__init__.py +++ b/sopel_modules/SpiceBot_Core_Commands/__init__.py @@ -10,6 +10,7 @@ from .Commands import * from .Channels import * from .Database import * from .Uptime import * +from .Logs import * from .Runtime_Controls import * __author__ = 'Sam Zick' diff --git a/sopel_modules/SpiceBot_Logs/Queue.py b/sopel_modules/SpiceBot_Core_Processing/Logs.py similarity index 73% rename from sopel_modules/SpiceBot_Logs/Queue.py rename to sopel_modules/SpiceBot_Core_Processing/Logs.py index 8daedbb..d1bf3ac 100644 --- a/sopel_modules/SpiceBot_Logs/Queue.py +++ b/sopel_modules/SpiceBot_Core_Processing/Logs.py @@ -1,19 +1,13 @@ -# coding=utf-8 +# coding=utf8 from __future__ import unicode_literals, absolute_import, division, print_function - -import sopel.module -import sopel.tools -import sopel.config +""" +This is the SpiceBot Logs system. +""" +import sopel import sopel_modules.SpiceBot as SpiceBot -def setup(bot): - SpiceBot.logs.log('SpiceBot_Logs', "Starting Setup Procedure") - SpiceBot.events.startup_add([SpiceBot.events.BOT_LOGS]) - SpiceBot.events.trigger(bot, SpiceBot.events.BOT_LOGS, "SpiceBot_Logs") - - @sopel.module.event(SpiceBot.events.RPL_WELCOME) @sopel.module.rule('.*') def join_log_channel(bot, trigger): diff --git a/sopel_modules/SpiceBot_Core_Processing/__init__.py b/sopel_modules/SpiceBot_Core_Processing/__init__.py index b2a3644..a8e5968 100644 --- a/sopel_modules/SpiceBot_Core_Processing/__init__.py +++ b/sopel_modules/SpiceBot_Core_Processing/__init__.py @@ -11,6 +11,7 @@ from .Events import * from .Modules import * from .osd import * from .StartupMonologue import * +from .Logs import * __author__ = 'Sam Zick' diff --git a/sopel_modules/SpiceBot_Logs/__init__.py b/sopel_modules/SpiceBot_Logs/__init__.py deleted file mode 100644 index ce9f911..0000000 --- a/sopel_modules/SpiceBot_Logs/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf8 -from __future__ import unicode_literals, absolute_import, division, print_function - -from .Queue import * -from .Logs_Command import * - -__author__ = 'Sam Zick' -__email__ = 'sam@deathbybandaid.net' -__version__ = '0.1.1'