Sat, 05 Sep 2015 15:22:58 +0100
client: verse improvements
local verse = require "verse".init("client"); verse.set_log_handler(verse._default_log_handler, { "debug", "info", "warn", "error" }); 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(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; }