commit to not forget code
This commit is contained in:
23
plugins/admin.py
Normal file
23
plugins/admin.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from plugins.plugin import Plugin
|
||||
import logging
|
||||
|
||||
|
||||
class Admin(Plugin):
|
||||
def activate(self):
|
||||
super(Admin, self).activate()
|
||||
|
||||
def deactivate(self):
|
||||
super(Admin, self).deactivate()
|
||||
|
||||
@Plugin.command(admin=True)
|
||||
def admin_reload_plugins(self, msg, args):
|
||||
"""Reload plugins"""
|
||||
self.plugin_manager.reload_plugins()
|
||||
return "Plugins reloaded"
|
||||
|
||||
@Plugin.command(admin=True)
|
||||
def admin_test(self, msg, args):
|
||||
"""Simple test"""
|
||||
return "You are admin"
|
||||
Reference in New Issue
Block a user