util.dependencies: Add a dummy util.ztact loader to log a message for people still...
authorMatthew Wild <mwild1@gmail.com>
Tue, 5 Apr 2011 12:20:09 +0000 (13:20 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 5 Apr 2011 12:20:09 +0000 (13:20 +0100)
util/dependencies.lua

index 9371521caeca1817320af115c5d2160639b05ec2..5baea942af4b52781332af029b0c30e47841219d 100644 (file)
@@ -35,6 +35,19 @@ function missingdep(name, sources, msg)
        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;