# HG changeset patch # User Kim Alvefur # Date 1488396668 -3600 # Node ID 3e1a85c5194cf2396a6683f1788ad926a32d68a3 # Parent 63dd3e525f1345f1c0c83e651ed5bb979cf966d8 mod_http_muc_log: Move scope of variables into loop diff -r 63dd3e525f13 -r 3e1a85c5194c mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Wed Mar 01 20:29:40 2017 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Wed Mar 01 20:31:08 2017 +0100 @@ -184,11 +184,10 @@ end local first, last; - local verb, subject, body; for key, item, when in iter do - body = item:get_child_text("body"); - subject = item:get_child_text("subject"); - verb = nil; + local body = item:get_child_text("body"); + local subject = item:get_child_text("subject"); + local verb = nil; if subject then verb, body = "set the topic to", subject; elseif body and body:sub(1,4) == "/me " then