ocarina/src/extra/lsset.py

30 lines
562 B
Python

# This is a simple test plugin, to make sure everything is working
__author__="bjschuma"
__date__ ="$Jan 9, 2010 7:22:31 PM$"
from bt.message import write
import settings
from bt import plugin
class Plugin(plugin.Plugin):
def __init__(self):
plugin.Plugin.__init__(self)
self.help = "Used to show the current state of settings"
def run(self, args=None):
keys = settings.settings.keys()
join = ", "
if args == None:
str = join.join(keys)
write(str)
else:
if settings.has(args[0]) == True:
write( settings.get(args[0], True) )