aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_uptime.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-10 15:33:53 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-10 15:33:53 +0100
commitd51286cbf6bbba6ff29f756a8abd95ea8e2f891b (patch)
treebf1844912353964f094ef935a41e0ba071b11dfc /plugins/mod_uptime.lua
parent118883d6553e9446dc6d7bf0f41649f041f77db8 (diff)
downloadprosody-d51286cbf6bbba6ff29f756a8abd95ea8e2f891b.tar.gz
prosody-d51286cbf6bbba6ff29f756a8abd95ea8e2f891b.zip
mod_uptime: Fix bad uptime if module is loaded at startup
Diffstat (limited to 'plugins/mod_uptime.lua')
-rw-r--r--plugins/mod_uptime.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_uptime.lua b/plugins/mod_uptime.lua
index f0a428d2..eb0ca7cc 100644
--- a/plugins/mod_uptime.lua
+++ b/plugins/mod_uptime.lua
@@ -15,6 +15,8 @@ local t_concat = table.concat;
local start_time = prosody.start_time;
+prosody.events.add_handler("server-started", function () start_time = prosody.start_time end);
+
module:add_feature("jabber:iq:last");
module:add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last",