[Crossfire-wiki] [Crossfire DokuWiki] page changed: server_plugin
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Sat Mar 17 10:31:32 CDT 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/03/17 10:31
User : ryo
Edit Summary: some more
@@ -162,15 +162,15 @@
A plugin should never change directly a value in a Crossfire object (player structure, ...), but use provided wrapping functions. Ideally, a plugin should not access directly that structure's memory to read values, either.
The simplest way is to look at the template plugin, available in[[http://crossfire.svn.sourceforge.net/viewvc/crossfire/server/trunk/plugins/template/|plugins/template directory of the server sources]]
- FIXME {expand}
Here are step by step instructions to create a basic plugin. Plugin name will be assumed to be ''cftest''. Paths are relative to server root.
* create your plugin directory ''cftest'', in ''plugins''
* copy ''plugins/template/plugin_template.c'' to ''plugins/template/cftest.c''
* copy ''plugins/template/include/plugin_template.h'' to ''plugins/cftest/include/cftest.h''
* modify ''plugins/cftest/cftest.c'' and ''plugins/cftest/include/cftest.h'' to correct the file names in the includes and such. You may also want to change the plugin's name
+ * in particular, ''PLUGIN_NAME'' should be set to a unique identifier that will be your plugin's name for the ''slaying'' field of events.
* copy ''plugins/template/Makefile.am'' to ''plugins/cftest/Makefile.am''
* edit this file, to change all occurrences of ''plugin_template'' to ''cftest'' (that fixes paths and a few macros)
* edit ''configure.ac''
* find the line ''AC_OUTPUT([Makefile''
@@ -178,4 +178,6 @@
* run ''autoconf && automake && configure && make && make install''
* your plugin should be installed and ready to run
Now you need to write your actual plugin logic.
+
+ FIXME link to common plugin documentation (generated from doxygen hopefully)
IP-Address : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/server_plugin?rev=1174145276
New Revision: http://wiki.metalforge.net/doku.php/server_plugin
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list