aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_version.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-01-13 19:18:37 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-01-13 19:18:37 +0500
commitc157d04ba36de495ca949fb72bcae323f0201bc7 (patch)
tree9ef5e9d66b4d54805775b5adcc749436c1fc26dd /plugins/mod_version.lua
parentc6365f205ec7656cf3f63c9b4fd01208d07778aa (diff)
downloadprosody-c157d04ba36de495ca949fb72bcae323f0201bc7.tar.gz
prosody-c157d04ba36de495ca949fb72bcae323f0201bc7.zip
mod_version: Removed and rearranged some code
Diffstat (limited to 'plugins/mod_version.lua')
-rw-r--r--plugins/mod_version.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/mod_version.lua b/plugins/mod_version.lua
index c263031a..8cc0c702 100644
--- a/plugins/mod_version.lua
+++ b/plugins/mod_version.lua
@@ -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);