mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
Updates
This commit is contained in:
parent
95b25c7b89
commit
9cc3458de4
@ -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
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
sopel>=6.0,<7
|
||||
spicemanip>=0.1.6
|
||||
gitpython
|
||||
fake-useragent
|
||||
|
||||
@ -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')
|
||||
|
||||
|
||||
@ -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.")
|
||||
|
||||
@ -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')
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user