aboutsummaryrefslogtreecommitdiffstats
path: root/util/mod_ping.lua
blob: c13282fffd30e5cc913767ac5469b3c54d124e7c (plain)
1
2
3
4
5
6
7
8
9
10
11

local st = require "util.stanza";

require "core.discomanager".set("ping", "urn:xmpp:ping");

add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping",
	function(session, stanza)
		if stanza.attr.type == "get" then
			session.send(st.reply(stanza));
		end
	end);