Menu

Config

nanotube

There is some good documentation on the Config system already, in the doc files in the docs directory of the supybot distribution. You will get some introduction in the basic PLUGIN_TUTORIAL file, and some more details in the CONFIGURATION and ADVANCED_PLUGIN_CONFIG.

This page will collect some extra info on particularly useful pieces.

Get plugin conf value

Talk about <plugin>.registryValue()

Get a global config value

Examples (from Factoids plugin.py).

For a channel-specific value, such as supybot.reply.whenAddressedBy.chars:

import supybot.conf as conf
channel=msg.args[0]
conf.get(conf.supybot.reply.whenAddressedBy.chars, channel)

If not channel-specific value, such as supybot.reply.format.time:

import supybot.conf as conf
conf.supybot.reply.format.time()

Related

Wiki: Plugin_testing
Wiki: Supybot_Resources