diff --git a/bot/bot.lua b/bot/bot.lua index 7495c30..70f5d8b 100644 --- a/bot/bot.lua +++ b/bot/bot.lua @@ -166,7 +166,7 @@ end function on_binlog_replay_end () started = 1 -- Uncomment the line to enable cron plugins. - -- postpone (cron_plugins, false, 1.0) + -- postpone (cron_plugins, false, 5.0) -- See plugins/ping.lua as an example for cron end @@ -187,7 +187,7 @@ function cron_plugins() for name, desc in pairs(plugins) do if desc.cron ~= nil then - print("croned!"..desc.description) + print(desc.description) desc.cron() end end diff --git a/plugins/ping.lua b/plugins/ping.lua index 63f0ea4..938abbf 100644 --- a/plugins/ping.lua +++ b/plugins/ping.lua @@ -1,10 +1,10 @@ socket = require("socket") function cron() - -- Checks a TCP connexion -- Use yours desired web and id - local addr = "gul.es" + local addr = "www.google.com" local dest = "user#id"..our_id + -- Checks a TCP connexion local connexion = socket.connect(addr, 80) if not connexion then local text = "ALERT: "..addr.." is offline"