Software /
code /
prosody
Comparison
tools/ejabberdsql2prosody.lua @ 13142:879a6a33c21b
tools: Update imports to use new prosody.* namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 08 Jun 2023 09:37:01 +0200 |
parent | 7568:4f7990902874 |
comparison
equal
deleted
inserted
replaced
13141:451cb119026e | 13142:879a6a33c21b |
---|---|
14 local my_name = arg[0]; | 14 local my_name = arg[0]; |
15 if my_name:match("[/\\]") then | 15 if my_name:match("[/\\]") then |
16 package.path = package.path..";"..my_name:gsub("[^/\\]+$", "../?.lua"); | 16 package.path = package.path..";"..my_name:gsub("[^/\\]+$", "../?.lua"); |
17 package.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so"); | 17 package.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so"); |
18 end | 18 end |
19 | 19 if not pcall(require, "prosody.loader") then |
20 | 20 pcall(require, "loader"); |
21 local serialize = require "util.serialization".serialize; | 21 end |
22 local st = require "util.stanza"; | 22 |
23 local parse_xml = require "util.xml".parse; | 23 |
24 package.loaded["util.logger"] = {init = function() return function() end; end} | 24 local serialize = require "prosody.util.serialization".serialize; |
25 local dm = require "util.datamanager" | 25 local st = require "prosody.util.stanza"; |
26 local parse_xml = require "prosody.util.xml".parse; | |
27 package.loaded["prosody.util.logger"] = {init = function() return function() end; end} | |
28 local dm = require "prosody.util.datamanager" | |
26 dm.set_data_path("data"); | 29 dm.set_data_path("data"); |
27 | 30 |
28 function parseFile(filename) | 31 function parseFile(filename) |
29 ------ | 32 ------ |
30 | 33 |