comparison mod_http_muc_log/mod_http_muc_log.lua @ 3063:a9fa98e28697

mod_http_muc_log: Use separate variable for filename and file handle
author Kim Alvefur <zash@zash.se>
date Mon, 28 May 2018 20:55:22 +0200
parents 37a78e365b46
children ce61f1826f1f
comparison
equal deleted inserted replaced
3062:37a78e365b46 3063:a9fa98e28697
29 29
30 module:depends"http"; 30 module:depends"http";
31 31
32 local template; 32 local template;
33 do 33 do
34 local template_file = module:get_option_string(module.name .. "_template", module.name .. ".html"); 34 local template_filename = module:get_option_string(module.name .. "_template", module.name .. ".html");
35 template_file = assert(module:load_resource(template_file)); 35 local template_file = assert(module:load_resource(template_filename));
36 template = template_file:read("*a"); 36 template = template_file:read("*a");
37 template_file:close(); 37 template_file:close();
38 end 38 end
39 39
40 -- local base_url = module:http_url() .. '/'; -- TODO: Generate links in a smart way 40 -- local base_url = module:http_url() .. '/'; -- TODO: Generate links in a smart way