Removed AdminPlugin (useless)
This commit is contained in:
parent
7ebcd7168d
commit
201676d909
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user