Changeset 806 for trunk/ithildin/doc/module.txt
- Timestamp:
- 06/01/07 11:09:07 (5 years ago)
- File:
-
- 1 edited
-
trunk/ithildin/doc/module.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ithildin/doc/module.txt
r490 r806 10 10 ############################################################################### 11 11 12 Basic information for setting up a module: 13 In the module's main file you need two global variables of name 'mheader' 14 and 'mdepends'. Additionally you may have functions to be called at load 15 time and at unload time. 16 17 You will need to include 'ithildin.h' in your module, then do the following: 18 19 MODULE_REGISTER("your module version", "your load function", 20 "your unload function); 21 22 the first value is optional and specifies the version of your module. if it 23 is empty it should be the empty string "" 24 the second and third values are also optional, and specify the symbol names 25 of functions to call when the module is loaded and unloaded. They may be 26 empty if no such functions exist. You must *NOT* use init() and fini() for 27 this! 28 29 Following that, if your module has any dependencies, you should place them 30 in a comment that looks like this: 31 /* 32 @DEPENDENCIES@: module1 module2 module3 ... 33 */ 34 Several lines of that form are acceptable. 35 36 If you need to find a module symbol, you can either use 'module_symbol(mod, 37 name)' if you have the module's structure, or 'lookup_module_symbol(modname, 38 symname)' if you don't have it. 39 40 The initialization function should return an integer value of non-zero if 41 loading was successful, otherwise a value of 0 indicating that the module 42 was NOT successful loading (the module will be closed and dropped in this 43 case, and the unloader *WILL NOT* be called) 12 Holy crap out of date. Check out the echo or ircd modules for 13 simple/complex examples. I owe docs on this.
Note: See TracChangeset
for help on using the changeset viewer.
