mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
quitmessage required
This commit is contained in:
parent
963ff50dcf
commit
dc8ca74640
@ -19,8 +19,9 @@ def nickname_comand_restart(bot, trigger):
|
||||
if not trigger.admin:
|
||||
bot.say("You are not authorized to perform this function.")
|
||||
|
||||
bot_logging(bot, 'SpiceBot_Restart', "Received command from " + trigger.nick + " to restart")
|
||||
bot.osd("Received command from " + trigger.nick + " to restart. Be Back Soon!", bot.channels.keys())
|
||||
quitmessage = "Received command from " + trigger.nick + " to restart. Be Back Soon!"
|
||||
bot_logging(bot, 'SpiceBot_Restart', quitmessage)
|
||||
bot.osd(quitmessage, bot.channels.keys())
|
||||
|
||||
# service_manip(bot, bot.nick, 'restart', 'SpiceBot_Restart')
|
||||
spicebot_reload(bot, 'SpiceBot_Restart')
|
||||
spicebot_reload(bot, 'SpiceBot_Restart', quitmessage)
|
||||
|
||||
@ -251,11 +251,11 @@ def channel_list_current(bot):
|
||||
"""Environment Functions"""
|
||||
|
||||
|
||||
def spicebot_reload(bot, log_from='service_manip'):
|
||||
def spicebot_reload(bot, log_from='service_manip', quitmessage='Recieved QUIT'):
|
||||
# service_manip(bot, bot.nick, 'restart', log_from)
|
||||
# bot.reload_plugins()
|
||||
# bot.write(('NOTICE', bot.nick), '001 Foo :Hello')
|
||||
bot.restart()
|
||||
bot.restart(quitmessage)
|
||||
|
||||
|
||||
def service_manip(bot, servicename, dowhat, log_from='service_manip'):
|
||||
|
||||
@ -54,22 +54,23 @@ def nickname_comand_update(bot, trigger):
|
||||
|
||||
triggerargs = spicemanip.main(triggerargs, '2+', 'list')
|
||||
|
||||
bot_logging(bot, 'SpiceBot_Update', "Received command from " + trigger.nick + " to update from Github and restart")
|
||||
bot.osd("Received command from " + trigger.nick + " to update from Github and restart. Be Back Soon!", bot.channels.keys())
|
||||
quitmessage = "Received command from " + trigger.nick + " to update from Github and restart"
|
||||
bot_logging(bot, 'SpiceBot_Update', quitmessage)
|
||||
bot.osd(quitmessage, bot.channels.keys())
|
||||
|
||||
if commandused == 'nodeps':
|
||||
spicebot_update(bot, "False")
|
||||
spicebot_update(bot, False)
|
||||
if commandused == 'deps':
|
||||
spicebot_update(bot, "True")
|
||||
spicebot_update(bot, True)
|
||||
|
||||
# service_manip(bot, bot.nick, 'restart', 'SpiceBot_Update')
|
||||
spicebot_reload(bot, 'SpiceBot_Update')
|
||||
spicebot_reload(bot, 'SpiceBot_Update', quitmessage)
|
||||
|
||||
|
||||
def spicebot_update(bot, deps="False"):
|
||||
def spicebot_update(bot, deps=False):
|
||||
|
||||
pipcommand = "sudo pip3 install --upgrade"
|
||||
if deps == "False":
|
||||
if not deps:
|
||||
pipcommand += " --no-deps"
|
||||
pipcommand += " --force-reinstall"
|
||||
pipcommand += " git+" + str(bot.config.SpiceBot_Update.gitrepo) + "@" + str(bot.config.SpiceBot_Update.gitbranch)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user