Mercurial > prosody-modules
comparison mod_delegation/README.markdown @ 1993:66aaf7c3cb29
mod_delegation: updated README
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 21 Dec 2015 11:31:10 +0100 |
parents | 4d73a1a6ba68 |
children | 4bf60727459b |
comparison
equal
deleted
inserted
replaced
1992:8dda3d7d616f | 1993:66aaf7c3cb29 |
---|---|
17 ======= | 17 ======= |
18 | 18 |
19 You can have all the details by reading the | 19 You can have all the details by reading the |
20 [XEP-0355](http://xmpp.org/extensions/xep-0355.html). Only the admin | 20 [XEP-0355](http://xmpp.org/extensions/xep-0355.html). Only the admin |
21 mode is implemented so far. | 21 mode is implemented so far. |
22 | |
23 If you use it with a component, you need to patch | |
24 core/mod\_component.lua to fire a new signal. To do it, copy the | |
25 following patch in a, for example, /tmp/component.patch file: | |
26 | |
27 diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua | |
28 --- a/plugins/mod_component.lua | |
29 +++ b/plugins/mod_component.lua | |
30 @@ -85,6 +85,7 @@ | |
31 session.type = "component"; | |
32 module:log("info", "External component successfully authenticated"); | |
33 session.send(st.stanza("handshake")); | |
34 + module:fire_event("component-authenticated", { session = session }); | |
35 | |
36 return true; | |
37 end | |
38 | |
39 Then, at the root of prosody, enter: | |
40 | |
41 `patch -p1 < /tmp/component.patch` | |
42 | 22 |
43 Usage | 23 Usage |
44 ===== | 24 ===== |
45 | 25 |
46 To use the module, like usual add **"delegation"** to your | 26 To use the module, like usual add **"delegation"** to your |
96 to use. | 76 to use. |
97 | 77 |
98 Compatibility | 78 Compatibility |
99 ============= | 79 ============= |
100 | 80 |
81 If you use it with Prosody 0.9 and a component, you need to patch | |
82 core/mod\_component.lua to fire a new signal. To do it, copy the | |
83 following patch in a, for example, /tmp/component.patch file: | |
84 | |
85 diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua | |
86 --- a/plugins/mod_component.lua | |
87 +++ b/plugins/mod_component.lua | |
88 @@ -85,6 +85,7 @@ | |
89 session.type = "component"; | |
90 module:log("info", "External component successfully authenticated"); | |
91 session.send(st.stanza("handshake")); | |
92 + module:fire_event("component-authenticated", { session = session }); | |
93 | |
94 return true; | |
95 end | |
96 | |
97 Then, at the root of prosody, enter: | |
98 | |
99 `patch -p1 < /tmp/component.patch` | |
100 | |
101 ----- ---------------------------------------------------- | 101 ----- ---------------------------------------------------- |
102 dev Need a patched core/mod\_component.lua (see above) | 102 0.10 Works |
103 0.9 Need a patched core/mod\_component.lua (see above) | 103 0.9 Need a patched core/mod\_component.lua (see above) |
104 ----- ---------------------------------------------------- | 104 ----- ---------------------------------------------------- |
105 | 105 |
106 Note | 106 Note |
107 ==== | 107 ==== |