29 |
29 |
30 local function handle_version_request(session, stanza) |
30 local function handle_version_request(session, stanza) |
31 if stanza.attr.type == "get" then |
31 if stanza.attr.type == "get" then |
32 session.send(st.reply(stanza):query(xmlns_version) |
32 session.send(st.reply(stanza):query(xmlns_version) |
33 :tag("name"):text("Prosody"):up() |
33 :tag("name"):text("Prosody"):up() |
34 :tag("version"):text("0.1"):up() |
34 :tag("version"):text("0.2"):up() |
35 :tag("os"):text("the best operating system ever!")); |
35 :tag("os"):text("the best operating system ever!")); |
36 end |
36 end |
37 end |
37 end |
38 |
38 |
39 module:add_iq_handler("c2s", xmlns_version, handle_version_request); |
39 module:add_iq_handler("c2s", xmlns_version, handle_version_request); |