Software /
code /
prosody
Diff
tools/ejabberd2prosody.lua @ 547:265c4b8f0a8a
Changed the ejabberd import script to use util.serialization
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 04 Dec 2008 23:40:15 +0500 |
parent | 519:cccd610a0ef9 |
child | 606:f8f1534a4e06 |
line wrap: on
line diff
--- a/tools/ejabberd2prosody.lua Thu Dec 04 23:27:54 2008 +0500 +++ b/tools/ejabberd2prosody.lua Thu Dec 04 23:40:15 2008 +0500 @@ -21,9 +21,9 @@ require "erlparse"; -require "serialize"; package.path = package.path ..";../?.lua"; +local serialize = require "util.serialization".serialize; local st = require "util.stanza"; package.loaded["util.logger"] = {init = function() return function() end; end} local dm = require "util.datamanager" @@ -74,7 +74,7 @@ elseif tuple[1] == "xmlcdata" then stanza:text(tuple[2]); else - error("unknown element type: "..serialize.serialize(tuple)); + error("unknown element type: "..serialize(tuple)); end end function build_time(tuple) @@ -190,7 +190,7 @@ count = count + 1; local name = item[1]; t[name] = (t[name] or 0) + 1; - --print(count, serialize.serialize(item)); + --print(count, serialize(item)); if filters[name] then filters[name](item); end end ---print(serialize.serialize(t)); +--print(serialize(t));