util.pluginloader: Return full file path from internal file loader on success, not...
[prosody.git] / util / dependencies.lua
index baa0cee213148c98594de74041bb95a8e3a4f1c7..9371521caeca1817320af115c5d2160639b05ec2 100644 (file)
@@ -1,6 +1,6 @@
 -- Prosody IM
--- Copyright (C) 2008-2009 Matthew Wild
--- Copyright (C) 2008-2009 Waqas Hussain
+-- Copyright (C) 2008-2010 Matthew Wild
+-- Copyright (C) 2008-2010 Waqas Hussain
 -- 
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
@@ -78,11 +78,6 @@ function check_dependencies()
                                ["luarocks"] = "luarocks install luasec";
                                ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/";
                        }, "SSL/TLS support will not be available");
-       else
-               local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)");
-               if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then
-                       log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends");
-               end
        end
        
        local encodings, err = softreq "util.encodings"
@@ -121,5 +116,13 @@ function check_dependencies()
        return not fatal;
 end
 
+function log_warnings()
+       if ssl then
+               local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)");
+               if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then
+                       log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends");
+               end
+       end
+end
 
 return _M;