From the NannyMUD documentation
2000-12-17
xmanmod_api - The API of the xmanmod.
INTRODUCTION This document describes the API of the xmanmod. The API allows you to add and remove user-specific help to the xmanmod. FINDING THE XMANMOD MODULE To use the API, you need to find the clone of the xmanmod which is used by the wizard. That is not hard: + Find his wizmod: wizmod = present("wizmod", wizard); + Call 'get_module_by_id: xmanmod = wizmod -> get_module_by_id("xmanmod"); FORMAT OF THE ADDED ENTRIES The added entries, be they keyword, part or syntax data, must all use the same format as the one provided by the system. At the time of writing, this is: entry: path/to/r2r/file line It is possible to use the eval-format, @path->func(arg), for the path. This is not tested. FORMAT OF THE MAN PAGES All of the man pages are supposed to be in the R2R format. If they aren't, they will still work; the formatting of R2R for the presentation is still done, but the page should pass it unaffected.
NAME
query_syntax_db - See what syntax has been added for the user.SYNTAX
string *query_syntax_db()DESCRIPTION
This function returns a copy of the syntax entries that has been added for the user.
FUNCTION
NAME
query_keyword_db - See what keywords has been added for the user.SYNTAX
string *query_keyword_db()DESCRIPTION
This function returns a copy of the keywords entries that has been added for the user.
FUNCTION
NAME
query_part_db - See what topics has been added for the user.SYNTAX
string *query_part_db()DESCRIPTION
This function returns a copy of the topics that has been added for the user.
FUNCTION
NAME
add_syntax - Add a syntax entry.SYNTAX
int add_syntax(string entry)DESCRIPTION
This function allows you to add a syntax entry to the user's manual.RETURN VALUES
XMAN_ENTRY_OK if the entry was added.XMAN_BAD_ENTRY if the entry has a bad format.XMAN_DUPLICATE_ENTRY if the entry already exists in the database.
FUNCTION
NAME
add_keyword - A a keyword.SYNTAX
int add_keyword(string entry)DESCRIPTION
This function allows you to add a keyword to the user's manual.RETURN VALUES
XMAN_ENTRY_OK if the entry was added.XMAN_BAD_ENTRY if the entry has a bad format.XMAN_DUPLICATE_ENTRY if the entry already exists in the database.
FUNCTION
NAME
add_part - Add a topic.SYNTAX
int add_part(string entry)DESCRIPTION
This function allows you to add a topic to the user's manual.RETURN VALUES
XMAN_ENTRY_OK if the entry was added.XMAN_BAD_ENTRY if the entry has a bad format.XMAN_DUPLICATE_ENTRY if the entry already exists in the database.
FUNCTION
NAME
remove_keyword - Remove a keyword.SYNTAX
int remove_keyword(string entry)DESCRIPTION
This function allows you to remove a keyword entry from the user's manual. Only entries in the per-user part can be removed. The argument 'entry' must be exactly the same as the entry in the database.RETURN VALUES
XMAN_OK on success.XMAN_NO_ENTRY if there is no such entry to remove.
FUNCTION
NAME
remove_syntax - Remove a syntax entry.SYNTAX
int remove_syntax(string entry)DESCRIPTION
This works exactly like 'remove_keyword' but for syntax entries.
FUNCTION
NAME
remove_part - Remove a topic.SYNTAX
int remove_part(string entry)DESCRIPTION
This works exactly as 'remove_keyword', but for topics.