Sat, 05 Sep 2015 14:46:22 +0100
client: Enable verse log output
local verse = require "verse"; verse.set_log_handler(io.stderr); local parse_xml = require "scansion.xml".parse; return { _validate = function (client) assert(client.jid, "No JID specified"); client.stream = verse.new(); end; connects = function (client) client.stream:connect(client.jid, client.password); end; sends = function (client, data) print(("%q"):format(table.concat(data))) print(parse_xml(table.concat(data))); print(stanza) end; receives = function (client, data) end; disconnects = function (client) end; }