Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > bd29f7c623a59d20a14e436e61b77739 > files > 3

crossfire-devel-1.11.0-5.fc15.x86_64.rpm

Plugin Information:
This plugin information is provided by Yann Chachkoff

Administrative commands (only available in DM mode):
----------------------------------------------------
pluglist

Lists all loaded plugins. Each plugin is identified in Crossfire by a
keyword; pluglist shows those keywords, as well as a short text describing
each plugin (usually a version string). If no plugin is loaded, the list will
simply appear empty. The keyword for the Python plugin is Python.

plugout <keyword>

Unloads a given plugin, identified by its _keyword_. So if you want to unload
the Python plugin, you need to do 'plugout Python'.

plugin <libname>

Loads a given plugin, whose _filename_ is libname. So in the case of Python,
you'd have to do a 'plugin cfpython.so'. Note that all filenames are
relative to the default plugin path (SHARE/plugins).

Console messages.
-----------------
When Crossfire starts, it tries to load all available files in the
SHARE/plugins directory as plugin libraries. It first displays the
'Initializing plugins:' message. Whenever a plugin has been loaded, the plugin
has the opportunity to signal itself by a message on the console. Then the
server displays an informative message containing both the plugin content and
its keyword. For the Python plugin, the standard load process thus gives:

[Info]    Initializing plugins
[Info]    Plugins directory is /usr/games/crossfire/lib/crossfire/plugins/
[Info]     -> Loading plugin : cfpython.so
[Debug]   CFPython 2.0a init
[Debug]   CFPython 2.0a post init
Running python initialize script.
Updating Guilds
['GUILD_TEMPLATE', 'PoisonedDagger', 'GreenGoblin']

When a plugin has been loaded, it can request to be warned whenever a global
event occurs (global events are 'shout', 'login', 'death', and so on). A
complete list of events is available in the include/plugin.h file.

Specific notes related to the Python plugin.
--------------------------------------------
The Python plugin supports all global events. The constant PYTHON_DEBUG
defined at the start of the plugin_python.c file increases the verbosity of
the plugin.

Global event scripts go into SHARE/maps/python/events/<event name>, and are named
freely by the developer. If the directory doesn't exist, nothing will happen.
<event name> can be 'init', 'login', ... (the right part of the EVENT_xxx defines).

Some problems have already been reported about the autodetection of the Python
libraries. Don't forget that you need the development files of Python (it
means the 'libpython2.x.a' and some header files, including 'Python.h'). If
configure fails whatever you try, you can still try to edit the plugin
Makefile by hand. You need to:
- Add your Python headers path to the INCLUDES= line. (for example:
-I/usr/include/python2.2);
- Add your Python library path to the PYTHON_LIB= line. (for example:
/usr/lib/python2.2/config/libpython2.2.a)
And then build the plugin after the server. Although I do not recommend this
technique, it may help sometimes.

Status of the logger and animator plugins isn't known.