mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
revert changes
This commit is contained in:
parent
539374e9ce
commit
e418f7ce7b
@ -7,8 +7,7 @@ import sopel.module
|
|||||||
import spicemanip
|
import spicemanip
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, googlesearch, bot_privs, inlist, inlist_match, similar_list
|
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
|
from sopel_modules.SpiceBot_Events.System import bot_events_check, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('(.*)')
|
@sopel.module.nickname_commands('(.*)')
|
||||||
|
|||||||
@ -6,8 +6,7 @@ from __future__ import unicode_literals, absolute_import, print_function, divisi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
from sopel.config.types import StaticSection, ValidatedAttribute, ListAttribute
|
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
|
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
from sopel_modules.SpiceBot_SBTools import (
|
from sopel_modules.SpiceBot_SBTools import (
|
||||||
join_all_channels, chanadmin_all_channels, channel_list_current,
|
join_all_channels, chanadmin_all_channels, channel_list_current,
|
||||||
bot_logging
|
bot_logging
|
||||||
@ -35,7 +34,7 @@ def configure(config):
|
|||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot_logging(bot, 'SpiceBot_Channels', "Starting setup procedure")
|
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)
|
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)
|
channel_list_current(bot)
|
||||||
foundchannelcount = len(bot.memory['SpiceBot_Channels']['channels'].keys())
|
foundchannelcount = len(bot.memory['SpiceBot_Channels']['channels'].keys())
|
||||||
bot_logging(bot, 'SpiceBot_Channels', "Channel listing finished! " + str(foundchannelcount) + " channel(s) found.")
|
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)
|
join_all_channels(bot)
|
||||||
chanadmin_all_channels(bot)
|
chanadmin_all_channels(bot)
|
||||||
@ -124,7 +123,7 @@ def bot_part_empty(bot):
|
|||||||
del bot.memory['SpiceBot_Channels']['channels'][channel.lower()]
|
del bot.memory['SpiceBot_Channels']['channels'][channel.lower()]
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.event(botevents.BOT_CHANNELS)
|
@sopel.module.event('2001')
|
||||||
@sopel.module.rule('.*')
|
@sopel.module.rule('.*')
|
||||||
def bot_events_setup(bot, trigger):
|
def bot_events_setup(bot, trigger):
|
||||||
bot_events_recieved(bot, trigger.event)
|
bot_events_recieved(bot, trigger.event)
|
||||||
|
|||||||
@ -6,8 +6,7 @@ import sopel.module
|
|||||||
|
|
||||||
import spicemanip
|
import spicemanip
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_Events.System import bot_events_check, BotEvents
|
from sopel_modules.SpiceBot_Events.System import bot_events_check, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
from sopel_modules.SpiceBot_SBTools import (
|
from sopel_modules.SpiceBot_SBTools import (
|
||||||
sopel_triggerargs, inlist, channel_privs,
|
sopel_triggerargs, inlist, channel_privs,
|
||||||
join_all_channels, channel_list_current,
|
join_all_channels, channel_list_current,
|
||||||
|
|||||||
@ -7,8 +7,7 @@ import sopel.module
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, BotEvents
|
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
from sopel_modules.SpiceBot_SBTools import bot_logging
|
from sopel_modules.SpiceBot_SBTools import bot_logging
|
||||||
|
|
||||||
import spicemanip
|
import spicemanip
|
||||||
|
|||||||
@ -5,8 +5,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
from sopel.trigger import PreTrigger
|
from sopel.trigger import PreTrigger
|
||||||
|
|
||||||
from .System import bot_events_trigger, bot_events_recieved, bot_events_startup_check, bot_events_setup_check, BotEvents
|
from .System import bot_events_trigger, bot_events_recieved, bot_events_startup_check, bot_events_setup_check, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
from sopel_modules.SpiceBot_SBTools import bot_logging
|
from sopel_modules.SpiceBot_SBTools import bot_logging
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|||||||
@ -11,7 +11,7 @@ from sopel_modules.SpiceBot_SBTools import bot_logging
|
|||||||
from random import randint
|
from random import randint
|
||||||
|
|
||||||
|
|
||||||
class BotEvents(object):
|
class botevents(object):
|
||||||
"""An dynamic listing of all the notable Bot numeric events.
|
"""An dynamic listing of all the notable Bot numeric events.
|
||||||
|
|
||||||
Events contained in this module will utilize the 1000-range
|
Events contained in this module will utilize the 1000-range
|
||||||
@ -23,13 +23,12 @@ class BotEvents(object):
|
|||||||
rather than ``@module.event('1001')``
|
rather than ``@module.event('1001')``
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
usednumbers = ['0', '1001', '1002', '1003', '1004']
|
||||||
self.usednumbers = ['0', '1001', '1002', '1003', '1004']
|
|
||||||
|
|
||||||
self.BOT_WELCOME = '1001'
|
BOT_WELCOME = '1001'
|
||||||
self.BOT_READY = '1002'
|
BOT_READY = '1002'
|
||||||
self.BOT_CONNECTED = '1003'
|
BOT_CONNECTED = '1003'
|
||||||
self.BOT_LOADED = '1004'
|
BOT_LOADED = '1004'
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
eventnumber = 0
|
eventnumber = 0
|
||||||
@ -40,9 +39,6 @@ class BotEvents(object):
|
|||||||
return eventnumber
|
return eventnumber
|
||||||
|
|
||||||
|
|
||||||
botevents = BotEvents()
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot_logging(bot, 'SpiceBot_Events', "Starting setup procedure")
|
bot_logging(bot, 'SpiceBot_Events', "Starting setup procedure")
|
||||||
bot_events_setup_check(bot)
|
bot_events_setup_check(bot)
|
||||||
|
|||||||
@ -5,8 +5,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs
|
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs
|
||||||
from sopel_modules.SpiceBot_Events.System import bot_events_check, bot_events_recieved, BotEvents
|
from sopel_modules.SpiceBot_Events.System import bot_events_check, bot_events_recieved, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
|||||||
@ -6,8 +6,7 @@ import sopel.module
|
|||||||
from sopel.config.types import StaticSection, ValidatedAttribute
|
from sopel.config.types import StaticSection, ValidatedAttribute
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_SBTools import bot_logging
|
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
|
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
|
|||||||
|
|
||||||
import sopel.module
|
import sopel.module
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_Events.System import bot_events_recieved, bot_events_trigger, BotEvents
|
from sopel_modules.SpiceBot_Events.System import bot_events_recieved, bot_events_trigger, botevents
|
||||||
botevents = BotEvents()
|
|
||||||
from sopel_modules.SpiceBot_SBTools import humanized_time, bot_logging
|
from sopel_modules.SpiceBot_SBTools import humanized_time, bot_logging
|
||||||
|
|
||||||
import time
|
import time
|
||||||
@ -39,7 +38,7 @@ def bot_startup_monologue_commands(bot, trigger):
|
|||||||
bot_events_trigger(bot, 2011, "SpiceBot_StartupMonologue")
|
bot_events_trigger(bot, 2011, "SpiceBot_StartupMonologue")
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.event(botevents.BOT_CHANNELS)
|
@sopel.module.event('2001')
|
||||||
@sopel.module.rule('.*')
|
@sopel.module.rule('.*')
|
||||||
def bot_startup_monologue_channels(bot, trigger):
|
def bot_startup_monologue_channels(bot, trigger):
|
||||||
bot_events_recieved(bot, trigger.event)
|
bot_events_recieved(bot, trigger.event)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user