Changeset

1322:bf6796061037

Merge
author Kim Alvefur <zash@zash.se>
date Wed, 26 Feb 2014 20:17:13 +0100
parents 1320:e670d4cc5027 (current diff) 1321:3fd6579d60cc (diff)
children 1323:c84ff82658cb
files
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mod_sms_clickatell/mod_sms_clickatell.lua	Wed Feb 26 20:15:41 2014 +0100
+++ b/mod_sms_clickatell/mod_sms_clickatell.lua	Wed Feb 26 20:17:13 2014 +0100
@@ -35,7 +35,6 @@
 
 local jid_split = require "util.jid".split;
 local st = require "util.stanza";
-local componentmanager = require "core.componentmanager";
 local datamanager = require "util.datamanager";
 local timer = require "util.timer";
 local config_get = require "core.configmanager".get;
@@ -584,7 +583,12 @@
 
 -- Component registration hooks: these hook in with the Prosody component
 -- manager 
-module.unload = function()
-	componentmanager.deregister_component(component_host);
-end
-component = componentmanager.register_component(component_host, sms_event_handler);
+module:hook("iq/bare", sms_event_handler);
+module:hook("message/bare", sms_event_handler);
+module:hook("presence/bare", sms_event_handler);
+module:hook("iq/full", sms_event_handler);
+module:hook("message/full", sms_event_handler);
+module:hook("presence/full", sms_event_handler);
+module:hook("iq/host", sms_event_handler);
+module:hook("message/host", sms_event_handler);
+module:hook("presence/host", sms_event_handler);