Comparison

plugins/mod_admin_shell.lua @ 12506:d04f6f014636

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 15 May 2022 23:22:33 +0200
parent 12480:7e9ebdc75ce4
parent 12505:604bb5b8362d
child 12529:7dae6d29b71d
comparison
equal deleted inserted replaced
12504:c589874fe348 12506:d04f6f014636
48 if not s then return end 48 if not s then return end
49 return (s:gsub("^%a", string.upper):gsub("_", " ")); 49 return (s:gsub("^%a", string.upper):gsub("_", " "));
50 end 50 end
51 51
52 local function pre(prefix, str, alt) 52 local function pre(prefix, str, alt)
53 if (str or "") == "" then return alt or ""; end 53 if type(str) ~= "string" or str == "" then return alt or ""; end
54 return prefix .. str; 54 return prefix .. str;
55 end 55 end
56 56
57 local function suf(str, suffix, alt) 57 local function suf(str, suffix, alt)
58 if (str or "") == "" then return alt or ""; end 58 if type(str) ~= "string" or str == "" then return alt or ""; end
59 return str .. suffix; 59 return str .. suffix;
60 end 60 end
61 61
62 local commands = module:shared("commands") 62 local commands = module:shared("commands")
63 local def_env = module:shared("env"); 63 local def_env = module:shared("env");