Sun, 31 May 2009 00:45:02 +0500
mod_presence: Changed to use the prosody.events object directly, rather than through eventmanager2
plugins/mod_presence.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/mod_presence.lua Sun May 31 00:43:24 2009 +0500 +++ b/plugins/mod_presence.lua Sun May 31 00:45:02 2009 +0500 @@ -267,10 +267,7 @@ return true; end -local add_handler = require "core.eventmanager2".add_handler; -local remove_handler = require "core.eventmanager2".remove_handler; - -add_handler(module:get_host().."/presence", presence_handler); +prosody.events.add_handler(module:get_host().."/presence", presence_handler); module.unload = function() - remove_handler(module:get_host().."/presence", presence_handler); + prosody.events.remove_handler(module:get_host().."/presence", presence_handler); end