mod_presence: Changed to use the prosody.events object directly, rather than through eventmanager2

Sun, 31 May 2009 00:45:02 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 31 May 2009 00:45:02 +0500
changeset 1245
be5fe60bd866
parent 1244
3df7417225fe
child 1246
3622ed42b92c

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

mercurial