aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_selftests.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-23 02:11:58 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-23 02:11:58 +0000
commita7b3157e9ff6d26b7218931646f6e02ed6063be8 (patch)
tree029d4221ff606131f14e5396650f746e8011534a /plugins/mod_selftests.lua
parent94e76383953dd2dfcbf40a2ff07bddac46fd8c71 (diff)
downloadprosody-a7b3157e9ff6d26b7218931646f6e02ed6063be8.tar.gz
prosody-a7b3157e9ff6d26b7218931646f6e02ed6063be8.zip
Fix mod_selftests syntax, and switch it to use config
Diffstat (limited to 'plugins/mod_selftests.lua')
-rw-r--r--plugins/mod_selftests.lua16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/mod_selftests.lua b/plugins/mod_selftests.lua
index fe09e529..4f128504 100644
--- a/plugins/mod_selftests.lua
+++ b/plugins/mod_selftests.lua
@@ -3,6 +3,8 @@ local st = require "util.stanza";
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 open_pings = {};
@@ -10,7 +12,7 @@ local t_insert = table.insert;
local log = require "util.logger".init("mod_selftests");
-local tests_jid, host; "self_tests@getjabber.ath.cx";
+local tests_jid = "self_tests@getjabber.ath.cx";
local host = "getjabber.ath.cx";
if not (tests_jid and host) then
@@ -44,14 +46,8 @@ if tests_jid and host then
open_pings[id] = socket.gettime();
end
- send_ping "matthewwild.co.uk"
- send_ping "snikket.com"
- send_ping "gmail.com"
- send_ping "isode.com"
- send_ping "jabber.org"
- send_ping "chrome.pl"
- send_ping "swissjabber.ch"
- send_ping "soapbox.net"
- send_ping "jabber.ccc.de"
+ for _, host in ipairs(ping_hosts) do
+ send_ping(host);
+ end
end);
end