Comparison

plugins/mod_presence.lua @ 1011:beb039827c9f

Stopped using presencemanager in stanza_router
author Waqas Hussain <waqas20@gmail.com>
date Wed, 15 Apr 2009 04:21:20 +0500
parent 1009:a2dd83bc3afa
child 1019:8d750336e517
comparison
equal deleted inserted replaced
1009:a2dd83bc3afa 1011:beb039827c9f
241 origin.directed[to] = true; 241 origin.directed[to] = true;
242 end 242 end
243 if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then 243 if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
244 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); 244 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);
245 elseif not to then 245 elseif not to then
246 handle_normal_presence(origin, stanza); 246 handle_normal_presence(origin, stanza, core_route_stanza);
247 else 247 else
248 core_route_stanza(origin, stanza); 248 core_route_stanza(origin, stanza);
249 end 249 end
250 elseif (origin.type == "s2sin" or origin.type == "component") and hosts[host] then 250 elseif (origin.type == "s2sin" or origin.type == "component") and hosts[host] then
251 if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then 251 if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
261 261
262 add_handler(module:get_host().."/presence", presence_handler); 262 add_handler(module:get_host().."/presence", presence_handler);
263 module.unload = function() 263 module.unload = function()
264 remove_handler(module:get_host().."/presence", presence_handler); 264 remove_handler(module:get_host().."/presence", presence_handler);
265 end 265 end
266
267 return _M;