From 75e0be19d870f2bbc92f914b6b82c2c6f5879e6b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 6 May 2015 19:58:03 +0100 Subject: sessionmanager: Rename unused loop variables to '_' [luacheck] --- core/sessionmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/sessionmanager.lua') diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 5e4e2991..9ff42aed 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -198,7 +198,7 @@ function send_to_available_resources(username, host, stanza) local count = 0; local user = bare_sessions[jid]; if user then - for k, session in pairs(user.sessions) do + for _, session in pairs(user.sessions) do if session.presence then session.send(stanza); count = count + 1; @@ -213,7 +213,7 @@ function send_to_interested_resources(user, host, stanza) local count = 0; local user = bare_sessions[jid]; if user then - for k, session in pairs(user.sessions) do + for _, session in pairs(user.sessions) do if session.interested then session.send(stanza); count = count + 1; -- cgit v1.2.3 From c9e911e28477049030315356bf08f1958612d2a7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 6 May 2015 19:58:33 +0100 Subject: sessionmanager: Rename argument to avoid name clash with local variable [luacheck] --- core/sessionmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/sessionmanager.lua') diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 9ff42aed..33cc3d21 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -208,8 +208,8 @@ function send_to_available_resources(username, host, stanza) return count; end -function send_to_interested_resources(user, host, stanza) - local jid = user.."@"..host; +function send_to_interested_resources(username, host, stanza) + local jid = username.."@"..host; local count = 0; local user = bare_sessions[jid]; if user then -- cgit v1.2.3