+}
+
+function executeCommand(type, childs, callback) {
+ if (adhoc_status.sessionid)
+ var execIQ = $iq({ type: "set", to: adhoc_status.queryJID, id: connection.getUniqueId() })
+ .c("command", { xmlns: Strophe.NS.ADHOC, node: adhoc_status.cmdNode, sessionid: adhoc_status.sessionid, action: type });
+ else
+ var execIQ = $iq({ type: "set", to: adhoc_status.queryJID, id: connection.getUniqueId() })
+ .c("command", { xmlns: Strophe.NS.ADHOC, node: adhoc_status.cmdNode, action: type });
+ if (childs)
+ execIQ.cnode(childs);
+ connection.sendIQ(execIQ, callback);