plugins/mod_version.lua

changeset 759
5cccfb5da6cb
parent 758
b1885732e979
child 760
90ce865eebd8
equal deleted inserted replaced
758:b1885732e979 759:5cccfb5da6cb
1 -- Prosody IM v0.2 1 -- Prosody IM v0.3
2 -- Copyright (C) 2008 Matthew Wild 2 -- Copyright (C) 2008 Matthew Wild
3 -- Copyright (C) 2008 Waqas Hussain 3 -- Copyright (C) 2008 Waqas Hussain
4 -- 4 --
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
16 16
17 module:add_iq_handler({"c2s", "s2sin"}, xmlns_version, function(session, stanza) 17 module:add_iq_handler({"c2s", "s2sin"}, xmlns_version, function(session, stanza)
18 if stanza.attr.type == "get" then 18 if stanza.attr.type == "get" then
19 session.send(st.reply(stanza):query(xmlns_version) 19 session.send(st.reply(stanza):query(xmlns_version)
20 :tag("name"):text("Prosody"):up() 20 :tag("name"):text("Prosody"):up()
21 :tag("version"):text("0.2"):up() 21 :tag("version"):text("0.3"):up()
22 :tag("os"):text("the best operating system ever!")); 22 :tag("os"):text("the best operating system ever!"));
23 end 23 end
24 end); 24 end);

mercurial