mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
23 lines
711 B
Python
23 lines
711 B
Python
#!/usr/bin/env python
|
|
# coding=utf-8
|
|
from __future__ import unicode_literals, absolute_import, print_function, division
|
|
|
|
# sopel imports
|
|
import sopel.module
|
|
|
|
import sopel_modules.SpiceBot as SpiceBot
|
|
|
|
|
|
@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!"
|
|
SpiceBot.botlogs.log('SpiceBot_Restart', quitmessage)
|
|
bot.osd(quitmessage, bot.channels.keys())
|
|
|
|
# service_manip(bot, bot.nick, 'restart', 'SpiceBot_Restart')
|
|
SpiceBot.spicebot_reload(bot, 'SpiceBot_Restart', quitmessage)
|