Changeset

4345:f6d694b1cdb3

mod_uptime: Use module:hook_global()
author Matthew Wild <mwild1@gmail.com>
date Sun, 14 Aug 2011 14:00:54 -0400
parents 4344:a24ee48ec30d
children 4346:28b9384c14fd
files plugins/mod_uptime.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_uptime.lua	Sun Aug 14 13:56:13 2011 -0400
+++ b/plugins/mod_uptime.lua	Sun Aug 14 14:00:54 2011 -0400
@@ -9,7 +9,7 @@
 local st = require "util.stanza";
 
 local start_time = prosody.start_time;
-prosody.events.add_handler("server-started", function() start_time = prosody.start_time end);
+module:hook_global("server-started", function() start_time = prosody.start_time end);
 
 -- XEP-0012: Last activity
 module:add_feature("jabber:iq:last");