Comparison

core/sessionmanager.lua @ 6676:a536978e0f01

sessionmanager: Rename unused loop variables to '_' [luacheck]
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:58:03 +0100
parent 6663:d3023dd07cb6
child 6677:1089f45c5e67
comparison
equal deleted inserted replaced
6675:cb5b56ddabfd 6676:a536978e0f01
196 function send_to_available_resources(username, host, stanza) 196 function send_to_available_resources(username, host, stanza)
197 local jid = username.."@"..host; 197 local jid = username.."@"..host;
198 local count = 0; 198 local count = 0;
199 local user = bare_sessions[jid]; 199 local user = bare_sessions[jid];
200 if user then 200 if user then
201 for k, session in pairs(user.sessions) do 201 for _, session in pairs(user.sessions) do
202 if session.presence then 202 if session.presence then
203 session.send(stanza); 203 session.send(stanza);
204 count = count + 1; 204 count = count + 1;
205 end 205 end
206 end 206 end
211 function send_to_interested_resources(user, host, stanza) 211 function send_to_interested_resources(user, host, stanza)
212 local jid = user.."@"..host; 212 local jid = user.."@"..host;
213 local count = 0; 213 local count = 0;
214 local user = bare_sessions[jid]; 214 local user = bare_sessions[jid];
215 if user then 215 if user then
216 for k, session in pairs(user.sessions) do 216 for _, session in pairs(user.sessions) do
217 if session.interested then 217 if session.interested then
218 session.send(stanza); 218 session.send(stanza);
219 count = count + 1; 219 count = count + 1;
220 end 220 end
221 end 221 end