# HG changeset patch # User florob@babelmonkeys.de # Date 1264173013 0 # Node ID 039a141a9c038368b91e2c8544638e2a2713a24a # Parent 958865cc13b3d08d08edff39fbc77de0765fde07 Update to reflect module rework. diff -r 958865cc13b3 -r 039a141a9c03 mod_adhoc.wiki --- a/mod_adhoc.wiki Sun Jan 03 01:49:40 2010 +0000 +++ b/mod_adhoc.wiki Fri Jan 22 15:10:13 2010 +0000 @@ -20,28 +20,18 @@ mod_adhoc_cmd_ping. If you want to build your own adhoc command, just register your adhoc command module with -module:add_item and a dictonary with name, node and a handler. +module:add_item and a descriptor for your command. E.g. -{{{ -module:add_item ("adhoc", { name="Ping", node="ping", handler=ping_command_handler }); -}}} - -Such a dictionary can be created for you using functionality provided by mod_adhoc like this: +A descriptor can be created like this: {{{ local adhoc_new = module:require "adhoc".new; local descriptor = adhoc_new("Name", "node", handler); module:add_item ("adhoc", descriptor) }}} -This will additionally grant you the possibility to use -{{{ -desc:cmdtag(status, sessionID, action) -}}} -to create a new command tag from within your handler. -In this example desc is the first parameter to your handler. For a simple module and details have a look at mod_adhoc_cmd_ping. = Compatibility = -||0.6||Works|| -||0.5.2||Works|| \ No newline at end of file +||trunk||Works|| +||0.6||Most commands work|| \ No newline at end of file