# HG changeset patch # User Kim Alvefur # Date 1647968831 -3600 # Node ID 0c1684c65716893fa34b53607d569190b7f46f09 # Parent 16a49f04d5075224b91462dbcc0fefea496a1f1a mod_adhoc: Simplify variable references Since commands[node] was already stored in a local a few lines up diff -r 16a49f04d507 -r 0c1684c65716 plugins/adhoc/mod_adhoc.lua --- a/plugins/adhoc/mod_adhoc.lua Mon Mar 06 15:19:35 2017 +0100 +++ b/plugins/adhoc/mod_adhoc.lua Tue Mar 22 18:07:11 2022 +0100 @@ -79,12 +79,12 @@ or (command.permission == "global_admin" and not global_admin) or (command.permission == "local_user" and hostname ~= module.host) then origin.send(st.error_reply(stanza, "auth", "forbidden", "You don't have permission to execute this command"):up() - :add_child(commands[node]:cmdtag("canceled") + :add_child(command:cmdtag("canceled") :tag("note", {type="error"}):text("You don't have permission to execute this command"))); return true end -- User has permission now execute the command - adhoc_handle_cmd(commands[node], origin, stanza); + adhoc_handle_cmd(command, origin, stanza); return true; end end, 500);