Mercurial > prosody-hg
comparison plugins/mod_ping.lua @ 427:3288dd8d9669
Yes, we don't put these things in here, we put them in here.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 26 Nov 2008 15:58:04 +0000 |
| parents | util/mod_ping.lua@f3b65866192e |
| children | 193f9dd64f17 |
comparison
equal
deleted
inserted
replaced
| 426:3d8778059e90 | 427:3288dd8d9669 |
|---|---|
| 1 | |
| 2 local st = require "util.stanza"; | |
| 3 | |
| 4 require "core.discomanager".set("ping", "urn:xmpp:ping"); | |
| 5 | |
| 6 add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping", | |
| 7 function(session, stanza) | |
| 8 if stanza.attr.type == "get" then | |
| 9 session.send(st.reply(stanza)); | |
| 10 end | |
| 11 end); |
