35 lines
782 B
Python
35 lines
782 B
Python
# This is a simple test plugin, to make sure everything is working
|
|
|
|
__author__="bjschuma"
|
|
__date__ ="$Dec 27, 2009 6:35:45 PM$"
|
|
|
|
|
|
from bt.message import write
|
|
from manager import manager
|
|
from bt import plugin
|
|
|
|
|
|
class Plugin(plugin.Plugin):
|
|
def __init__(self):
|
|
plugin.Plugin.__init__(self)
|
|
self.help = "Used to list currently loaded plugins"
|
|
|
|
|
|
def run(self, args=None):
|
|
mods = []
|
|
if (args == None) or (("enabled" in args)==True) or (("all" in args)==True):
|
|
for plugin in manager.enabled.keys():
|
|
mods += [plugin]
|
|
|
|
if not(args==None) and ( (("disabled" in args) == True) or (("all" in args)==True) ):
|
|
for plugin in manager.disabled.keys():
|
|
mods += [plugin]
|
|
|
|
if len(mods) == 0:
|
|
return
|
|
comma = ', '
|
|
list = comma.join(mods)
|
|
write(list)
|
|
|
|
return mods
|