plugins/mod_version.lua

changeset 615
4ae3e81513f3
parent 541
3521e0851c9e
child 704
ef8d0d339172
equal deleted inserted replaced
614:335f2921ae0c 615:4ae3e81513f3
1 -- Prosody IM v0.1 1 -- Prosody IM v0.2
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 program is free software; you can redistribute it and/or 5 -- This program is free software; you can redistribute it and/or
6 -- modify it under the terms of the GNU General Public License 6 -- modify it under the terms of the GNU General Public License
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);

mercurial