revert changes

This commit is contained in:
deathbybandaid 2019-05-14 17:10:57 -04:00
parent 539374e9ce
commit e418f7ce7b
9 changed files with 18 additions and 30 deletions

View File

@ -7,8 +7,7 @@ import sopel.module
import spicemanip
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, googlesearch, bot_privs, inlist, inlist_match, similar_list
from sopel_modules.SpiceBot_Events.System import bot_events_check, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_check, botevents
@sopel.module.nickname_commands('(.*)')

View File

@ -6,8 +6,7 @@ from __future__ import unicode_literals, absolute_import, print_function, divisi
import sopel.module
from sopel.config.types import StaticSection, ValidatedAttribute, ListAttribute
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, botevents
from sopel_modules.SpiceBot_SBTools import (
join_all_channels, chanadmin_all_channels, channel_list_current,
bot_logging
@ -35,7 +34,7 @@ def configure(config):
def setup(bot):
bot_logging(bot, 'SpiceBot_Channels', "Starting setup procedure")
bot_events_startup_register(bot, [botevents.BOT_CHANNELS])
bot_events_startup_register(bot, ['2001'])
bot.config.define_section("SpiceBot_Channels", SpiceBot_Channels_MainSection, validate=False)
@ -75,7 +74,7 @@ def trigger_channel_list_initial(bot, trigger):
channel_list_current(bot)
foundchannelcount = len(bot.memory['SpiceBot_Channels']['channels'].keys())
bot_logging(bot, 'SpiceBot_Channels', "Channel listing finished! " + str(foundchannelcount) + " channel(s) found.")
bot_events_trigger(bot, botevents.BOT_CHANNELS, "SpiceBot_Channels")
bot_events_trigger(bot, '2001', "SpiceBot_Channels")
join_all_channels(bot)
chanadmin_all_channels(bot)
@ -124,7 +123,7 @@ def bot_part_empty(bot):
del bot.memory['SpiceBot_Channels']['channels'][channel.lower()]
@sopel.module.event(botevents.BOT_CHANNELS)
@sopel.module.event('2001')
@sopel.module.rule('.*')
def bot_events_setup(bot, trigger):
bot_events_recieved(bot, trigger.event)

View File

@ -6,8 +6,7 @@ import sopel.module
import spicemanip
from sopel_modules.SpiceBot_Events.System import bot_events_check, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_check, botevents
from sopel_modules.SpiceBot_SBTools import (
sopel_triggerargs, inlist, channel_privs,
join_all_channels, channel_list_current,

View File

@ -7,8 +7,7 @@ import sopel.module
import os
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, botevents
from sopel_modules.SpiceBot_SBTools import bot_logging
import spicemanip

View File

@ -5,8 +5,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
import sopel.module
from sopel.trigger import PreTrigger
from .System import bot_events_trigger, bot_events_recieved, bot_events_startup_check, bot_events_setup_check, BotEvents
botevents = BotEvents()
from .System import bot_events_trigger, bot_events_recieved, bot_events_startup_check, bot_events_setup_check, botevents
from sopel_modules.SpiceBot_SBTools import bot_logging
import time

View File

@ -11,7 +11,7 @@ from sopel_modules.SpiceBot_SBTools import bot_logging
from random import randint
class BotEvents(object):
class botevents(object):
"""An dynamic listing of all the notable Bot numeric events.
Events contained in this module will utilize the 1000-range
@ -23,13 +23,12 @@ class BotEvents(object):
rather than ``@module.event('1001')``
"""
def __init__(self):
self.usednumbers = ['0', '1001', '1002', '1003', '1004']
usednumbers = ['0', '1001', '1002', '1003', '1004']
self.BOT_WELCOME = '1001'
self.BOT_READY = '1002'
self.BOT_CONNECTED = '1003'
self.BOT_LOADED = '1004'
BOT_WELCOME = '1001'
BOT_READY = '1002'
BOT_CONNECTED = '1003'
BOT_LOADED = '1004'
def __getattr__(self, attr):
eventnumber = 0
@ -40,9 +39,6 @@ class BotEvents(object):
return eventnumber
botevents = BotEvents()
def setup(bot):
bot_logging(bot, 'SpiceBot_Events', "Starting setup procedure")
bot_events_setup_check(bot)

View File

@ -5,8 +5,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
import sopel.module
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs
from sopel_modules.SpiceBot_Events.System import bot_events_check, bot_events_recieved, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_check, bot_events_recieved, botevents
def setup(bot):

View File

@ -6,8 +6,7 @@ import sopel.module
from sopel.config.types import StaticSection, ValidatedAttribute
from sopel_modules.SpiceBot_SBTools import bot_logging
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, botevents
import os

View File

@ -4,8 +4,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
import sopel.module
from sopel_modules.SpiceBot_Events.System import bot_events_recieved, bot_events_trigger, BotEvents
botevents = BotEvents()
from sopel_modules.SpiceBot_Events.System import bot_events_recieved, bot_events_trigger, botevents
from sopel_modules.SpiceBot_SBTools import humanized_time, bot_logging
import time
@ -39,7 +38,7 @@ def bot_startup_monologue_commands(bot, trigger):
bot_events_trigger(bot, 2011, "SpiceBot_StartupMonologue")
@sopel.module.event(botevents.BOT_CHANNELS)
@sopel.module.event('2001')
@sopel.module.rule('.*')
def bot_startup_monologue_channels(bot, trigger):
bot_events_recieved(bot, trigger.event)