aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-03-22 18:07:11 +0100
committerKim Alvefur <zash@zash.se>2022-03-22 18:07:11 +0100
commit4dc57d01f124c16e4536bdc12dda77c563b00816 (patch)
treea3902c67595ff5848f8b39cadaed5ca007fa3168 /plugins
parent6fea6634dd465da3ac1de24c83d2cd1021009404 (diff)
downloadprosody-4dc57d01f124c16e4536bdc12dda77c563b00816.tar.gz
prosody-4dc57d01f124c16e4536bdc12dda77c563b00816.zip
mod_adhoc: Simplify variable references
Since commands[node] was already stored in a local a few lines up
Diffstat (limited to 'plugins')
-rw-r--r--plugins/adhoc/mod_adhoc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/adhoc/mod_adhoc.lua b/plugins/adhoc/mod_adhoc.lua
index 09a72075..9d6ff77a 100644
--- a/plugins/adhoc/mod_adhoc.lua
+++ b/plugins/adhoc/mod_adhoc.lua
@@ -79,12 +79,12 @@ module:hook("iq-set/host/"..xmlns_cmd..":command", function (event)
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);