# HG changeset patch # User Kim Alvefur # Date 1407850940 -7200 # Node ID b703e6930e4ce08f73690c359dd7174e92aa8562 # Parent 10dc228a45a4173d41c4a43c6cb9a5fa096ee446 mod_blocklist: Use full word as variable name, we can afford that diff -r 10dc228a45a4 -r b703e6930e4c plugins/mod_blocklist.lua --- a/plugins/mod_blocklist.lua Tue Aug 12 15:40:00 2014 +0200 +++ b/plugins/mod_blocklist.lua Tue Aug 12 15:42:20 2014 +0200 @@ -103,11 +103,11 @@ local function edit_blocklist(event) local origin, stanza = event.origin, event.stanza; local username = origin.username; - local act = stanza.tags[1]; + local action = stanza.tags[1]; local new = {}; local jid; - for item in act:childtags("item") do + for item in action:childtags("item") do jid = jid_prep(item.attr.jid); if not jid then return origin.send(st_error_reply(stanza, "modify", "jid-malformed")); @@ -116,7 +116,7 @@ new[jid] = is_contact_subscribed(username, host, jid) or false; end - local mode = act.name == "block" or nil; + local mode = action.name == "block" or nil; if mode and not next(new) then -- element does not contain at least one child element @@ -156,7 +156,7 @@ end if sessions[username] then local blocklist_push = st.iq({ type = "set", id = "blocklist-push" }) - :add_child(act); -- I am lazy + :add_child(action); -- I am lazy for _, session in pairs(sessions[username].sessions) do if session.interested_blocklist then