aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-07 19:20:33 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-07 19:20:33 +0000
commitb7f373b15969fe2e496e741fe73d4ac188bd7282 (patch)
tree100fbb9c330d71e82aac49c4e37a8ee0e72da76d /tools
parent0c8d2cefc7097ddbe6fa43db08866a2de55ca1df (diff)
downloadprosody-b7f373b15969fe2e496e741fe73d4ac188bd7282.tar.gz
prosody-b7f373b15969fe2e496e741fe73d4ac188bd7282.zip
tools/xep227toprosody.lua: Convert to use util.xmppstream
Diffstat (limited to 'tools')
-rwxr-xr-xtools/xep227toprosody.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/xep227toprosody.lua b/tools/xep227toprosody.lua
index bfe06c48..a8f807d6 100755
--- a/tools/xep227toprosody.lua
+++ b/tools/xep227toprosody.lua
@@ -36,13 +36,14 @@ end
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 @@ function cb.handlestanza(session, stanza)
end
end
-local user_handlers = init_xmlhandlers({ notopen = true, }, cb);
+local user_handlers = new_xmpp_handlers({ notopen = true }, cb);
-----------------------------------------------------------------------