aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/adhoc
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/adhoc')
-rw-r--r--plugins/adhoc/adhoc.lib.lua8
-rw-r--r--plugins/adhoc/mod_adhoc.lua4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua
index 87415636..91806d26 100644
--- a/plugins/adhoc/adhoc.lib.lua
+++ b/plugins/adhoc/adhoc.lib.lua
@@ -25,13 +25,13 @@ function _M.new(name, node, handler, permission)
end
function _M.handle_cmd(command, origin, stanza)
- local cmdtag = stanza.tags[1]
- local sessionid = cmdtag.attr.sessionid or uuid.generate();
+ local command = stanza.tags[1];
+ local sessionid = command.attr.sessionid or uuid.generate();
local dataIn = {
to = stanza.attr.to;
from = stanza.attr.from;
- action = cmdtag.attr.action or "execute";
- form = cmdtag:get_child("x", "jabber:x:data");
+ action = command.attr.action or "execute";
+ form = command:get_child("x", "jabber:x:data");
};
local data, state = command:handler(dataIn, states[sessionid]);
diff --git a/plugins/adhoc/mod_adhoc.lua b/plugins/adhoc/mod_adhoc.lua
index 1c956021..8668af97 100644
--- a/plugins/adhoc/mod_adhoc.lua
+++ b/plugins/adhoc/mod_adhoc.lua
@@ -45,8 +45,8 @@ module:hook("host-disco-info-node", function (event)
end);
module:hook("host-disco-items-node", function (event)
- local stanza, origin, reply, node = event.stanza, event.origin, event.reply, event.node;
- if node ~= xmlns_cmd then
+ local stanza, origin, reply, disco_node = event.stanza, event.origin, event.reply, event.node;
+ if disco_node ~= xmlns_cmd then
return;
end