util.dependencies: Add a dummy util.ztact loader to log a message for people still using it (e.g. in their Debian-derived config files)
authorMatthew Wild <mwild1@gmail.com>
Tue, 05 Apr 2011 13:20:09 +0100
changeset 4236 75ef9ea83b07
parent 4235 899ffc1674b5
child 4237 6b0d7d94eb7f
util.dependencies: Add a dummy util.ztact loader to log a message for people still using it (e.g. in their Debian-derived config files)
util/dependencies.lua
--- a/util/dependencies.lua	Tue Apr 05 12:59:24 2011 +0100
+++ b/util/dependencies.lua	Tue Apr 05 13:20:09 2011 +0100
@@ -35,6 +35,19 @@
 	print("");
 end
 
+-- COMPAT w/pre-0.8 Debian: The Debian config file used to use 
+-- util.ztact, which has been removed from Prosody in 0.8. This
+-- is to log an error for people who still use it, so they can
+-- update their configs.
+package.preload["util.ztact"] = function ()
+	if not package.loaded["core.loggingmanager"] then
+		error("util.ztact has been removed from Prosody and you need to fix your config "
+		    .."file. More information can be found at http://prosody.im/doc/packagers#ztact", 0);
+	else
+		error("module 'util.ztact' has been deprecated in Prosody 0.8.");
+	end
+end;
+
 function check_dependencies()
 	local fatal;