aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cfgdump.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-06-08 09:37:01 +0200
committerKim Alvefur <zash@zash.se>2023-06-08 09:37:01 +0200
commit1541284108b73abc332a7930eff3dc4d5fc5490b (patch)
treeb4cdfc948f6112e9bd47d2b41ff90c358ca57c52 /tools/cfgdump.lua
parent0d6c625f935a28a94ae8893747d4fdbeb1e53d87 (diff)
downloadprosody-1541284108b73abc332a7930eff3dc4d5fc5490b.tar.gz
prosody-1541284108b73abc332a7930eff3dc4d5fc5490b.zip
tools: Update imports to use new prosody.* namespace
Diffstat (limited to 'tools/cfgdump.lua')
-rwxr-xr-xtools/cfgdump.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/cfgdump.lua b/tools/cfgdump.lua
index 8c331a58..eef13e6d 100755
--- a/tools/cfgdump.lua
+++ b/tools/cfgdump.lua
@@ -1,21 +1,24 @@
#!/usr/bin/env lua
-- cfgdump.lua prosody.cfg.lua [[host] option]
+if not pcall(require, "prosody.loader") then
+ pcall(require, "loader");
+end
local s_format, print = string.format, print;
local printf = function(fmt, ...) return print(s_format(fmt, ...)); end
-local it = require "util.iterators";
+local it = require "prosody.util.iterators";
local function sort_anything(a, b)
local typeof_a, typeof_b = type(a), type(b);
if typeof_a ~= typeof_b then return typeof_a < typeof_b end
return a < b -- should work for everything in a config file
end
-local serialization = require "util.serialization";
+local serialization = require "prosody.util.serialization";
local serialize = serialization.new and serialization.new({
unquoted = true, table_iterator = function(t) return it.sorted_pairs(t, sort_anything); end,
}) or serialization.serialize;
-local configmanager = require"core.configmanager";
-local startup = require "util.startup";
+local configmanager = require"prosody.core.configmanager";
+local startup = require "prosody.util.startup";
startup.set_function_metatable();
local config_filename, onlyhost, onlyoption = ...;