aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_ping.lua
blob: 8306078c77c5760cec0c546878c2f1c2fa812354 (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");

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