mod_sms_clickatell/mod_sms_clickatell.lua
changeset 1320 3fd6579d60cc
parent 983 ac9bf3fcbcfe
child 1343 7dbde05b48a9
--- a/mod_sms_clickatell/mod_sms_clickatell.lua	Wed Feb 26 18:36:22 2014 +0100
+++ b/mod_sms_clickatell/mod_sms_clickatell.lua	Wed Feb 26 12:38:57 2014 -0500
@@ -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);