Comparison

core/sessionmanager.lua @ 2141:f544729f9228

sessionmanager: Added function send_to_interested_resources().
author Waqas Hussain <waqas20@gmail.com>
date Sun, 22 Nov 2009 21:41:09 +0500
parent 2140:94b7ba39787d
child 2144:8e59d37a0e68
child 2816:59dfb99831ae
comparison
equal deleted inserted replaced
2140:94b7ba39787d 2141:f544729f9228
213 end 213 end
214 end 214 end
215 return count; 215 return count;
216 end 216 end
217 217
218 function send_to_interested_resources(user, host, stanza)
219 local jid = user.."@"..host;
220 local count = 0;
221 local user = bare_sessions[jid];
222 if user then
223 for k, session in pairs(user.sessions) do
224 if session.interested then
225 session.send(stanza);
226 count = count + 1;
227 end
228 end
229 end
230 return count;
231 end
232
218 return _M; 233 return _M;