# HG changeset patch # User Matthew Wild # Date 1291749633 0 # Node ID db1c1ddc79e8e329bbb2f857675fea8b108c6ddb # Parent 2dcb86c7cee795ed9e0078c1ad7b4c37d296caac tools/xep227toprosody.lua: Convert to use util.xmppstream diff -r 2dcb86c7cee7 -r db1c1ddc79e8 tools/xep227toprosody.lua --- a/tools/xep227toprosody.lua Tue Dec 07 19:19:05 2010 +0000 +++ b/tools/xep227toprosody.lua Tue Dec 07 19:20:33 2010 +0000 @@ -36,13 +36,14 @@ local lxp = require "lxp"; local st = require "util.stanza"; -local init_xmlhandlers = require "core.xmlhandlers"; +local xmppstream = require "util.xmppstream"; +local new_xmpp_handlers = xmppstream.new_sax_handlers; local dm = require "util.datamanager" dm.set_data_path("data"); -local ns_separator = "\1"; -local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$"; local ns_xep227 = "http://www.xmpp.org/extensions/xep-0227.html#ns"; +local ns_separator = xmppstream.ns_separator; +local ns_pattern = xmppstream.ns_pattern; ----------------------------------------------------------------------- @@ -176,7 +177,7 @@ end end -local user_handlers = init_xmlhandlers({ notopen = true, }, cb); +local user_handlers = new_xmpp_handlers({ notopen = true }, cb); -----------------------------------------------------------------------