Software /
code /
prosody
Changeset
13529:3ec7222349ac
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 26 Oct 2024 12:43:53 +0200 |
parents | 13527:dba43269db5e (current diff) 13528:c228f1ffb7b3 (diff) |
children | 13530:87cced02c32b |
files | plugins/mod_admin_adhoc.lua |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_adhoc.lua Sun Oct 20 12:11:21 2024 +0200 +++ b/plugins/mod_admin_adhoc.lua Sat Oct 26 12:43:53 2024 +0200 @@ -592,15 +592,15 @@ return generate_error_message(err); end local ok_list, err_list = {}, {}; - for _, module in ipairs(fields.modules) do - local ok, err = modulemanager.reload(module_host, module); + for _, module_ in ipairs(fields.modules) do + local ok, err = modulemanager.reload(module_host, module_); if ok then - ok_list[#ok_list + 1] = module; + ok_list[#ok_list + 1] = module_; else - err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")"; + err_list[#err_list + 1] = module_ .. "(Error: " .. tostring(err) .. ")"; end + module:log("info", "mod_%s reloaded by %s", module_, jid.bare(data.from)); end - module:log("info", "mod_%s reloaded by %s", fields.module, jid.bare(data.from)); local info = (#ok_list > 0 and ("The following modules were successfully reloaded on host "..module_host..":\n"..t_concat(ok_list, "\n")) or "") .. ((#ok_list > 0 and #err_list > 0) and "\n" or "") .. (#err_list > 0 and ("Failed to reload the following modules on host "..module_host..":\n"..t_concat(err_list, "\n")) or ""); @@ -742,15 +742,15 @@ return generate_error_message(err); end local ok_list, err_list = {}, {}; - for _, module in ipairs(fields.modules) do - local ok, err = modulemanager.unload(module_host, module); + for _, module_ in ipairs(fields.modules) do + local ok, err = modulemanager.unload(module_host, module_); if ok then - ok_list[#ok_list + 1] = module; + ok_list[#ok_list + 1] = module_; else - err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")"; + err_list[#err_list + 1] = module_ .. "(Error: " .. tostring(err) .. ")"; end + module:log("info", "mod_%s unloaded by %s", module_, jid.bare(data.from)); end - module:log("info", "mod_%s unloaded by %s", fields.module, jid.bare(data.from)); local info = (#ok_list > 0 and ("The following modules were successfully unloaded on host "..module_host..":\n"..t_concat(ok_list, "\n")) or "") .. ((#ok_list > 0 and #err_list > 0) and "\n" or "") .. (#err_list > 0 and ("Failed to unload the following modules on host "..module_host..":\n"..t_concat(err_list, "\n")) or "");