mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
24 lines
756 B
Python
24 lines
756 B
Python
#!/usr/bin/env python
|
|
# coding=utf-8
|
|
from __future__ import unicode_literals, absolute_import, print_function, division
|
|
|
|
# sopel imports
|
|
import sopel.module
|
|
|
|
from sopel_modules.SpiceBot.Logs import botlogs
|
|
from sopel_modules.SpiceBot.Tools import spicebot_reload
|
|
|
|
|
|
@sopel.module.nickname_commands('restart')
|
|
def nickname_comand_restart(bot, trigger):
|
|
|
|
if not trigger.admin:
|
|
bot.say("You are not authorized to perform this function.")
|
|
|
|
quitmessage = "Received command from " + trigger.nick + " to restart. Be Back Soon!"
|
|
botlogs.log('SpiceBot_Restart', quitmessage)
|
|
bot.osd(quitmessage, bot.channels.keys())
|
|
|
|
# service_manip(bot, bot.nick, 'restart', 'SpiceBot_Restart')
|
|
spicebot_reload(bot, 'SpiceBot_Restart', quitmessage)
|