mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
Code Cleanup
This commit is contained in:
parent
14481bff13
commit
072d4167ed
@ -9,18 +9,6 @@ import spicemanip
|
|||||||
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, bot_privs
|
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, bot_privs
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('owners', 'owner')
|
@sopel.module.nickname_commands('owners', 'owner')
|
||||||
def bot_command_owners(bot, trigger):
|
def bot_command_owners(bot, trigger):
|
||||||
bot_command_process(bot, trigger)
|
bot_command_process(bot, trigger)
|
||||||
|
|||||||
@ -7,17 +7,13 @@ import sopel.module
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_LoadOrder.LoadOrder import set_bot_event, check_bot_events, startup_bot_event
|
from sopel_modules.SpiceBot_LoadOrder.LoadOrder import set_bot_event, startup_bot_event
|
||||||
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger
|
from sopel_modules.SpiceBot_Events.System import bot_events_startup_register, bot_events_recieved, bot_events_trigger
|
||||||
from sopel_modules.SpiceBot_SBTools import bot_logging
|
from sopel_modules.SpiceBot_SBTools import bot_logging
|
||||||
|
|
||||||
import spicemanip
|
import spicemanip
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot_logging(bot, 'SpiceBot_CommandsQuery', "Starting setup procedure")
|
bot_logging(bot, 'SpiceBot_CommandsQuery', "Starting setup procedure")
|
||||||
bot_events_startup_register(bot, ['2002'])
|
bot_events_startup_register(bot, ['2002'])
|
||||||
|
|||||||
@ -21,10 +21,6 @@ def setup(bot):
|
|||||||
SopelDB._create_table = SopelDBCache._create_table
|
SopelDB._create_table = SopelDBCache._create_table
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class SopelDBCache:
|
class SopelDBCache:
|
||||||
|
|
||||||
"""Dynamic Table Creation"""
|
"""Dynamic Table Creation"""
|
||||||
|
|||||||
@ -6,18 +6,6 @@ from __future__ import unicode_literals, absolute_import, print_function, divisi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
"""Dyanmic Table Creation"""
|
"""Dyanmic Table Creation"""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,18 +9,6 @@ import spicemanip
|
|||||||
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, bot_privs, github_dict
|
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, bot_privs, github_dict
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('help', 'docs', 'wiki')
|
@sopel.module.nickname_commands('help', 'docs', 'wiki')
|
||||||
def bot_command_owners(bot, trigger):
|
def bot_command_owners(bot, trigger):
|
||||||
bot.osd(["IRC Modules Repository", str(github_dict["url_main"] + github_dict["repo_owner"] + "/" + github_dict["repo_name"] + github_dict["url_path_wiki"])])
|
bot.osd(["IRC Modules Repository", str(github_dict["url_main"] + github_dict["repo_owner"] + "/" + github_dict["repo_name"] + github_dict["url_path_wiki"])])
|
||||||
|
|||||||
@ -8,10 +8,6 @@ import sopel
|
|||||||
from sopel_modules.SpiceBot_SBTools import bot_logging
|
from sopel_modules.SpiceBot_SBTools import bot_logging
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@ -7,18 +7,6 @@ import sopel.module
|
|||||||
import spicemanip
|
import spicemanip
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$')
|
@sopel.module.rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$')
|
||||||
def bot_command_hello(bot, trigger):
|
def bot_command_hello(bot, trigger):
|
||||||
hello = spicemanip.main(['Hi', 'Hey', 'Hello'], "random")
|
hello = spicemanip.main(['Hi', 'Hey', 'Hello'], "random")
|
||||||
|
|||||||
@ -5,18 +5,6 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('gender')
|
@sopel.module.nickname_commands('gender')
|
||||||
def bot_command_gender(bot, trigger):
|
def bot_command_gender(bot, trigger):
|
||||||
bot.osd("If societal genders are binary, my gender is female")
|
bot.osd("If societal genders are binary, my gender is female")
|
||||||
|
|||||||
@ -5,18 +5,6 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.rule(r'(?i)(Fuck|Screw) (you|off),? $nickname[ \t]*$')
|
@sopel.module.rule(r'(?i)(Fuck|Screw) (you|off),? $nickname[ \t]*$')
|
||||||
def bot_command_srewyou(bot, trigger):
|
def bot_command_srewyou(bot, trigger):
|
||||||
bot.osd("Watch your mouth, " + trigger.nick + ", or I'll tell your mother!")
|
bot.osd("Watch your mouth, " + trigger.nick + ", or I'll tell your mother!")
|
||||||
|
|||||||
@ -10,12 +10,7 @@ from sopel_modules.SpiceBot_SBTools import bot_logging
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
# TODO add custom pretrigger events
|
|
||||||
bot_logging(bot, 'Sopel_LoadOrder', "Starting Module Events Logging")
|
bot_logging(bot, 'Sopel_LoadOrder', "Starting Module Events Logging")
|
||||||
|
|
||||||
threading.Thread(target=setup_thread, args=(bot,)).start()
|
threading.Thread(target=setup_thread, args=(bot,)).start()
|
||||||
|
|||||||
@ -9,18 +9,6 @@ import spicemanip
|
|||||||
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, command_permissions_check, inlist
|
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, command_permissions_check, inlist
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('action')
|
@sopel.module.nickname_commands('action')
|
||||||
def bot_command_action(bot, trigger):
|
def bot_command_action(bot, trigger):
|
||||||
bot_command_process(bot, trigger)
|
bot_command_process(bot, trigger)
|
||||||
|
|||||||
@ -8,18 +8,6 @@ import sopel.module
|
|||||||
from sopel_modules.SpiceBot_SBTools import bot_logging, spicebot_reload
|
from sopel_modules.SpiceBot_SBTools import bot_logging, spicebot_reload
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('restart')
|
@sopel.module.nickname_commands('restart')
|
||||||
def nickname_comand_restart(bot, trigger):
|
def nickname_comand_restart(bot, trigger):
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,6 @@ from sopel_modules.SpiceBot_SBTools import humanized_time, bot_logging
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@module.event('001')
|
@module.event('001')
|
||||||
@module.rule('.*')
|
@module.rule('.*')
|
||||||
@module.thread(True)
|
@module.thread(True)
|
||||||
|
|||||||
@ -29,10 +29,6 @@ def setup(bot):
|
|||||||
bot.config.define_section("SpiceBot_Update", SpiceBot_Update_MainSection, validate=False)
|
bot.config.define_section("SpiceBot_Update", SpiceBot_Update_MainSection, validate=False)
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.nickname_commands('update')
|
@sopel.module.nickname_commands('update')
|
||||||
def nickname_comand_update(bot, trigger):
|
def nickname_comand_update(bot, trigger):
|
||||||
|
|
||||||
|
|||||||
@ -11,10 +11,6 @@ from sopel_modules.SpiceBot_SBTools import humanized_time
|
|||||||
from sopel_modules.SpiceBot_SBTools import bot_logging
|
from sopel_modules.SpiceBot_SBTools import bot_logging
|
||||||
|
|
||||||
|
|
||||||
def configure(config):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
if 'SpiceBot_Uptime' not in bot.memory:
|
if 'SpiceBot_Uptime' not in bot.memory:
|
||||||
now = time.time()
|
now = time.time()
|
||||||
|
|||||||
@ -54,11 +54,6 @@ def setup(bot):
|
|||||||
bot.config.define_section("MAXTARGCONFIG", MAXTARGCONFIG, validate=False)
|
bot.config.define_section("MAXTARGCONFIG", MAXTARGCONFIG, validate=False)
|
||||||
|
|
||||||
|
|
||||||
def shutdown(bot):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
# RPL_ISUPPORT = '005'
|
|
||||||
@module.event('005')
|
@module.event('005')
|
||||||
@module.rule('.*')
|
@module.rule('.*')
|
||||||
def parse_event_005(bot, trigger):
|
def parse_event_005(bot, trigger):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user