summaryrefslogtreecommitdiff
path: root/plugins/README.txt
blob: 8324b3dafa077d6a2e27cf5bb6f8c6eb39918abf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This directory contains plugins for ManaChat.

To autoload the plugin, in the [Plugins] section of manachat.ini add

[Plugins]
...
pluginname = 1
...

The plugin and it's dependencies will be autoloaded.
The plugin must export a variable PLUGIN, and the function init()

PLUGIN = {
   'name' : 'PluginName'  # not really used atm
   'requires' : (plugin1, plugin2, ...)  # list of required plugins
   'blocks' : (plugin3, plugin4, ...)    # list of incompatible plugins
}

def init(config):   # config is ConfigParser instance
    # ... plugin initialisation code ...
    pass

See 'shop.py' as an example.