Software /
code /
prosody
Changeset
3831:93ea0f9622a1
tools/xep227toprosody.lua: Convert to use util.xmppstream
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Dec 2010 19:20:33 +0000 |
parents | 3830:6e13a7a0b535 |
children | 3832:8eff6e82570d |
files | tools/xep227toprosody.lua |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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); -----------------------------------------------------------------------