aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_ping.lua11
-rw-r--r--plugins/mod_selftests.lua2
2 files changed, 12 insertions, 1 deletions
diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua
new file mode 100644
index 00000000..c13282ff
--- /dev/null
+++ b/plugins/mod_ping.lua
@@ -0,0 +1,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);
diff --git a/plugins/mod_selftests.lua b/plugins/mod_selftests.lua
index 4f128504..8aa70952 100644
--- a/plugins/mod_selftests.lua
+++ b/plugins/mod_selftests.lua
@@ -4,7 +4,7 @@ local register_component = require "core.componentmanager".register_component;
local core_route_stanza = core_route_stanza;
local socket = require "socket";
local config = require "core.configmanager";
-local ping_hosts = config.get("*", "mod_selftests", "ping_hosts") or { "jabber.org" };
+local ping_hosts = config.get("*", "mod_selftests", "ping_hosts") or { "coversant.interop.xmpp.org", "djabberd.interop.xmpp.org", "djabberd-trunk.interop.xmpp.org", "ejabberd.interop.xmpp.org", "openfire.interop.xmpp.org" };
local open_pings = {};