Diff

plugins/mod_invites.lua @ 12977:74b9e05af71e

plugins: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 24 Mar 2023 13:15:28 +0100
parent 12834:dcbff9f038a0
child 13012:c2616274bef7
line wrap: on
line diff
--- a/plugins/mod_invites.lua	Fri Mar 17 18:03:07 2023 +0100
+++ b/plugins/mod_invites.lua	Fri Mar 24 13:15:28 2023 +0100
@@ -1,8 +1,8 @@
-local id = require "util.id";
-local it = require "util.iterators";
+local id = require "prosody.util.id";
+local it = require "prosody.util.iterators";
 local url = require "socket.url";
-local jid_node = require "util.jid".node;
-local jid_split = require "util.jid".split;
+local jid_node = require "prosody.util.jid".node;
+local jid_split = require "prosody.util.jid".split;
 
 local default_ttl = module:get_option_number("invite_expiry", 86400 * 7);
 
@@ -205,7 +205,7 @@
 	-- Since the console is global this overwrites the command for
 	-- each host it's loaded on, but this should be fine.
 
-	local get_module = require "core.modulemanager".get_module;
+	local get_module = require "prosody.core.modulemanager".get_module;
 
 	local console_env = module:shared("/*/admin_shell/env");
 
@@ -238,8 +238,8 @@
 	end
 	table.remove(arg, 1); -- pop command
 
-	local sm = require "core.storagemanager";
-	local mm = require "core.modulemanager";
+	local sm = require "prosody.core.storagemanager";
+	local mm = require "prosody.core.modulemanager";
 
 	local host = arg[1];
 	assert(prosody.hosts[host], "Host "..tostring(host).." does not exist");
@@ -288,7 +288,7 @@
 			print("--reset and the other options cannot be mixed.")
 			return 2
 		elseif value == "--reset" then
-			local nodeprep = require "util.encodings".stringprep.nodeprep;
+			local nodeprep = require "prosody.util.encodings".stringprep.nodeprep;
 			local username = nodeprep(arg[1])
 			table.remove(arg, 1);
 			if not username then