Software /
code /
prosody
Changeset
704:ef8d0d339172
mod_version: Removed and rearranged some code
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 13 Jan 2009 19:18:37 +0500 |
parents | 703:f9909efed20c |
children | 705:11afa1d88c55 |
files | plugins/mod_version.lua |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_version.lua Tue Jan 13 19:17:25 2009 +0500 +++ b/plugins/mod_version.lua Tue Jan 13 19:18:37 2009 +0500 @@ -21,20 +21,15 @@ local st = require "util.stanza"; -local log = require "util.logger".init("mod_version"); - local xmlns_version = "jabber:iq:version" module:add_feature(xmlns_version); -local function handle_version_request(session, stanza) +module:add_iq_handler({"c2s", "s2sin"}, xmlns_version, function(session, stanza) if stanza.attr.type == "get" then session.send(st.reply(stanza):query(xmlns_version) :tag("name"):text("Prosody"):up() :tag("version"):text("0.2"):up() :tag("os"):text("the best operating system ever!")); end -end - -module:add_iq_handler("c2s", xmlns_version, handle_version_request); -module:add_iq_handler("s2sin", xmlns_version, handle_version_request); +end);