From 9cc3458de4612ea0fa9cda02a5f4eb389398d34a Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sun, 5 May 2019 10:58:29 -0400 Subject: [PATCH] Updates --- README.md | 8 ++++++++ requirements.txt | 1 - sopel_modules/SpiceBot_Channels/Channels.py | 2 +- sopel_modules/SpiceBot_Restart/Restart.py | 2 +- sopel_modules/SpiceBot_Update/Update.py | 17 ++++++----------- sopel_modules/SpiceBot_osd/__init__.py | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 47140c4..ea9474b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ SpiceBot aims to run SpiceBot as an IRC service Use at your own risk. Problems are not my faultâ„¢. # Installation +This install assumes you know that you need sopel installed, depending on how bleeding edge you want sopel to be, + +```` +pip3 install sopel>=6.0,<7 +OR +pip3 install git+https://github.com/sopel-irc/sopel@master +```` + ```` git clone https://github.com/SpiceBot/SpiceBot.git cd SpiceBot diff --git a/requirements.txt b/requirements.txt index bb005cf..6aabc4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -sopel>=6.0,<7 spicemanip>=0.1.6 gitpython fake-useragent diff --git a/sopel_modules/SpiceBot_Channels/Channels.py b/sopel_modules/SpiceBot_Channels/Channels.py index 908a5f1..c181b53 100644 --- a/sopel_modules/SpiceBot_Channels/Channels.py +++ b/sopel_modules/SpiceBot_Channels/Channels.py @@ -137,7 +137,7 @@ def watch_chanlist_complete(bot, trigger): @sopel.module.nickname_commands('channels', 'channel') -def nickname_comand_chanstats(bot, trigger): +def nickname_comand_channels(bot, trigger): triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command') diff --git a/sopel_modules/SpiceBot_Restart/Restart.py b/sopel_modules/SpiceBot_Restart/Restart.py index b9d2863..818a823 100644 --- a/sopel_modules/SpiceBot_Restart/Restart.py +++ b/sopel_modules/SpiceBot_Restart/Restart.py @@ -14,7 +14,7 @@ def shutdown(bot): @sopel.module.nickname_commands('restart') -def nickname_comand_chanstats(bot, trigger): +def nickname_comand_restart(bot, trigger): if not trigger.admin: bot.say("You are not authorized to perform this function.") diff --git a/sopel_modules/SpiceBot_Update/Update.py b/sopel_modules/SpiceBot_Update/Update.py index f2f0c2b..d51648b 100644 --- a/sopel_modules/SpiceBot_Update/Update.py +++ b/sopel_modules/SpiceBot_Update/Update.py @@ -35,7 +35,7 @@ def shutdown(bot): @sopel.module.nickname_commands('update') -def nickname_comand_chanstats(bot, trigger): +def nickname_comand_update(bot, trigger): if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']): bot.say("I was unable to process this Bot Nick command due to privilege issues.") @@ -74,20 +74,15 @@ def spicebot_update(bot, deps="False"): pipcommand += " --force-reinstall" pipcommand += " git+" + str(bot.config.SpiceBot_Update.gitrepo) + "@" + str(bot.config.SpiceBot_Update.gitbranch) - """ - pipcommand = ['install'] - pipcommand.append('--upgrade') - if deps == "False": - pipcommand.append('--no-deps') - pipcommand.append('--force-reinstall') - pipcommand.append("git+" + str(bot.config.SpiceBot_Update.gitrepo) + "@" + str(bot.config.SpiceBot_Update.gitbranch)) - pip.main(pipcommand) - """ - bot_logging(bot, 'SpiceBot_Update', "Running `" + pipcommand + "`") for line in os.popen(pipcommand).read().split('\n'): bot_logging(bot, 'SpiceBot_Update', " " + line) + stock_modules_begone(bot) + + +def stock_modules_begone(bot): + # Remove stock modules, if present main_sopel_dir = os.path.dirname(os.path.abspath(sopel.__file__)) modules_dir = os.path.join(main_sopel_dir, 'modules') diff --git a/sopel_modules/SpiceBot_osd/__init__.py b/sopel_modules/SpiceBot_osd/__init__.py index e4c73d0..93cbfc2 100644 --- a/sopel_modules/SpiceBot_osd/__init__.py +++ b/sopel_modules/SpiceBot_osd/__init__.py @@ -37,7 +37,7 @@ def setup(bot): # Inject OSD bot_logging(bot, 'SpiceBot_OSD', "Implanting OSD function into bot") bot.osd = SopelOSD.osd - bot.SopelWrapper.osd = SopelOSD.SopelWrapper.osd + sopel.bot.SopelWrapper.osd = SopelOSD.SopelWrapper.osd tools.get_available_message_bytes = ToolsOSD.get_available_message_bytes tools.get_sendable_message_list = ToolsOSD.get_sendable_message_list tools.get_message_recipientgroups = ToolsOSD.get_message_recipientgroups