Software /
code /
prosody
Annotate
plugins/mod_version.lua @ 284:4f540755260c
mod_saslauth: Added base64 decoding, encoding check, and cleaned the code up.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 15 Nov 2008 23:20:07 +0500 |
parent | 219:f06e97f525bc |
child | 298:985710ea308b |
rev | line source |
---|---|
188 | 1 |
2 local st = require "util.stanza"; | |
3 local send = require "core.sessionmanager".send_to_session; | |
4 | |
5 local log = require "util.logger".init("mod_version"); | |
6 | |
7 local xmlns_version = "jabber:iq:version" | |
8 | |
9 local function handle_version_request(session, stanza) | |
219 | 10 if stanza.attr.type == "get" then |
11 session.send(st.reply(stanza):query(xmlns_version) | |
12 :tag("name"):text("lxmppd"):up() | |
13 :tag("version"):text("pre-alpha"):up() | |
14 :tag("os"):text("The best one")); | |
15 end | |
188 | 16 end |
17 | |
18 add_iq_handler("c2s", xmlns_version, handle_version_request); | |
189
3f0e3a07b491
Fix for mod_version over s2s
Matthew Wild <mwild1@gmail.com>
parents:
188
diff
changeset
|
19 add_iq_handler("s2sin", xmlns_version, handle_version_request); |