# HG changeset patch # User Matthew Wild # Date 1313344854 14400 # Node ID f6d694b1cdb3f59f65eb1529f914bbb2e93ab68a # Parent a24ee48ec30decbc274b2106853a6667b929f1e6 mod_uptime: Use module:hook_global() diff -r a24ee48ec30d -r f6d694b1cdb3 plugins/mod_uptime.lua --- 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");