# HG changeset patch # User Waqas Hussain # Date 1393436337 18000 # Node ID 3fd6579d60cc00d25c5f4d10dc62f07b3652e1df # Parent 400a7fdd20499d705668d0b4d47c2f149796308f mod_sms_clickatell: Get rid of legacy componentmanager usage. Now uses stanza events. diff -r 400a7fdd2049 -r 3fd6579d60cc mod_sms_clickatell/mod_sms_clickatell.lua --- 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);