Diff

plugins/mod_uptime.lua @ 4345:f6d694b1cdb3

mod_uptime: Use module:hook_global()
author Matthew Wild <mwild1@gmail.com>
date Sun, 14 Aug 2011 14:00:54 -0400
parent 3540:bc139431830b
child 5776:bd0ff8ae98a8
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");