Comparison

plugins/mod_admin_telnet.lua @ 9403:4416c1a96400

mod_admin_telnet: Rename variable to avoid name clash [luacheck]
author Kim Alvefur <zash@zash.se>
date Sun, 30 Sep 2018 14:16:49 +0200
parent 9391:4001eb3f465a
child 9404:f40b0cd41a87
comparison
equal deleted inserted replaced
9402:b530b5daae91 9403:4416c1a96400
32 32
33 local commands = module:shared("commands") 33 local commands = module:shared("commands")
34 local def_env = module:shared("env"); 34 local def_env = module:shared("env");
35 local default_env_mt = { __index = def_env }; 35 local default_env_mt = { __index = def_env };
36 36
37 local function redirect_output(_G, session) 37 local function redirect_output(target, session)
38 local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end }); 38 local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(target, k); end });
39 env.dofile = function(name) 39 env.dofile = function(name)
40 local f, err = envloadfile(name, env); 40 local f, err = envloadfile(name, env);
41 if not f then return f, err; end 41 if not f then return f, err; end
42 return f(); 42 return f();
43 end; 43 end;