Mercurial > prosody-wiki
annotate mod_adhoc.wiki @ 108:039a141a9c03
Update to reflect module rework.
author | florob@babelmonkeys.de |
---|---|
date | Fri, 22 Jan 2010 15:10:13 +0000 |
parents | 5012ffd5d569 |
children | 040360195e00 |
rev | line source |
---|---|
10 | 1 #summary XEP-0050: Ad-Hoc Commands |
33 | 2 #labels Stage-Beta |
9 | 3 |
4 = Introduction = | |
5 | |
6 implementation of [http://xmpp.org/extensions/xep-0050.html XEP-0050: Ad-Hoc Commands]. | |
7 | |
8 | |
9 | |
10 = Details = | |
11 | |
47
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
12 Will offer any adhoc command registered via 'module:add_item("adhoc", ....)'. |
9 | 13 |
14 | |
15 | |
16 = Usage = | |
47
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
17 |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
18 First copy (or symlink) the directory "adhoc" which contains mod_adhoc to your plugins directory. |
9 | 19 Load mod_adhoc and then any module which provides an adhoc command, such as |
20 mod_adhoc_cmd_ping. | |
21 | |
22 If you want to build your own adhoc command, just register your adhoc command module with | |
108 | 23 module:add_item and a descriptor for your command. |
9 | 24 |
47
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
25 E.g. |
108 | 26 A descriptor can be created like this: |
47
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
27 {{{ |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
28 local adhoc_new = module:require "adhoc".new; |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
29 local descriptor = adhoc_new("Name", "node", handler); |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
30 module:add_item ("adhoc", descriptor) |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
31 }}} |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
32 |
5012ffd5d569
Edited wiki page through web user interface.
florob@babelmonkeys.de
parents:
33
diff
changeset
|
33 For a simple module and details have a look at mod_adhoc_cmd_ping. |
12 | 34 |
24 | 35 = Compatibility = |
108 | 36 ||trunk||Works|| |
37 ||0.6||Most commands work|| |