Removed AdminPlugin (useless)

This commit is contained in:
mrhanky 2017-06-30 13:16:39 +02:00
parent 7ebcd7168d
commit 201676d909
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -5,25 +5,20 @@ from docopt import Dict as DocoptDict
from irc3.plugins.command import command
from irc3.utils import IrcString
from . import MODULE, Plugin
from . import MODULE
@command(permission='admin', show_in_help_list=False)
def reload(bot: irc3.IrcBot, mask: IrcString, target: IrcString,
args: DocoptDict):
"""Reloads a plugin or the whole bot
"""Reloads a plugin or the whole bot.
%%reload [<plugin>]
"""
plugin = args.get('<plugin>')
if plugin:
bot.reload('{module}.{plugin}'.format(plugin=plugin, module=MODULE))
bot.privmsg(target, 'Reloaded plugin "{}"'.format(plugin))
bot.privmsg(target, 'Reloaded plugin "{plugin}"'.format(plugin=plugin))
else:
bot.reload()
bot.privmsg(target, 'Reloaded the bot')
@irc3.plugin
class Admin(Plugin):
pass