Diff

plugins/mod_presence.lua @ 1245:be5fe60bd866

mod_presence: Changed to use the prosody.events object directly, rather than through eventmanager2
author Waqas Hussain <waqas20@gmail.com>
date Sun, 31 May 2009 00:45:02 +0500
parent 1211:d60e68855176
child 1276:d0e80c1578e1
line wrap: on
line diff
--- 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