modules.txt 894 B

123456789101112131415161718192021222324252627
  1. All modules must have at least the following functions:
  2. int load_module():
  3. Do what you need to do when you get started. This function
  4. returns 0 on success and non-zero on failure (it is not considered loaded
  5. if it fails.
  6. int unload_module():
  7. The module will soon be unloaded. If any channels are using your
  8. features, you should give them a softhangup in an effort to keep the
  9. program from crashing. Generally, unload_module is only called when the
  10. usecount is 0 or less, but the user can force unloading at their
  11. discretion, and thus a module should do its best to comply (although in
  12. some cases there may be no way to avoid a crash). This function should
  13. return 0 on success and non-zero on failure (i.e. it cannot yet be
  14. unloaded).
  15. char *description():
  16. Return a description of the module's functionality.
  17. int usecnt():
  18. Return the number of channels, etc that are using you.