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.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
from . import MODULE, Plugin
|
from . import MODULE
|
||||||
|
|
||||||
|
|
||||||
@command(permission='admin', show_in_help_list=False)
|
@command(permission='admin', show_in_help_list=False)
|
||||||
def reload(bot: irc3.IrcBot, mask: IrcString, target: IrcString,
|
def reload(bot: irc3.IrcBot, mask: IrcString, target: IrcString,
|
||||||
args: DocoptDict):
|
args: DocoptDict):
|
||||||
"""Reloads a plugin or the whole bot
|
"""Reloads a plugin or the whole bot.
|
||||||
|
|
||||||
%%reload [<plugin>]
|
%%reload [<plugin>]
|
||||||
"""
|
"""
|
||||||
plugin = args.get('<plugin>')
|
plugin = args.get('<plugin>')
|
||||||
if plugin:
|
if plugin:
|
||||||
bot.reload('{module}.{plugin}'.format(plugin=plugin, module=MODULE))
|
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:
|
else:
|
||||||
bot.reload()
|
bot.reload()
|
||||||
bot.privmsg(target, 'Reloaded the bot')
|
bot.privmsg(target, 'Reloaded the bot')
|
||||||
|
|
||||||
|
|
||||||
@irc3.plugin
|
|
||||||
class Admin(Plugin):
|
|
||||||
pass
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user