31 c:hook("ready", function () |
31 c:hook("ready", function () |
32 print("Stream ready!"); |
32 print("Stream ready!"); |
33 c.version:set{ name = "verse example component" }; |
33 c.version:set{ name = "verse example component" }; |
34 end); |
34 end); |
35 |
35 |
|
36 -- Echo, echo, echo, echo... |
|
37 c:hook("stanza", function (stanza) |
|
38 stanza.attr.from, stanza.attr.to = stanza.attr.to, stanza.attr.from; |
|
39 c:send(stanza); |
|
40 end) |
|
41 |
36 print("Starting loop...") |
42 print("Starting loop...") |
37 verse.loop() |
43 verse.loop() |