net/connhandlers.lua

Wed, 08 Oct 2008 22:42:51 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 08 Oct 2008 22:42:51 +0100
changeset 82
cbf387f29d56
parent 38
3fdfd6e0cb4e
permissions
-rw-r--r--

Fix for saving tables with non-string keys


local lxp = require "lxp"
local init_xmlhandlers = require "core.xmlhandlers"

module "connhandlers"


function new(name, session)
	if name == "xmpp-client" then
		local parser = lxp.new(init_xmlhandlers(session), ":");
		local parse = parser.parse;
		return { data = function (self, data) return parse(parser, data); end, parser = parser }
	end
end

return _M;

mercurial