# HG changeset patch # User Kim Alvefur # Date 1390767384 -3600 # Node ID 28a90f5fea4612c7e470319f79db2976e7bd391b # Parent 3547f315a1f5cdef0d7cc7b4fe8ce648cf904cc0 modulemanager: Always load a platform-specific module, add stub modules for Windows and unknown platforms diff -r 3547f315a1f5 -r 28a90f5fea46 core/modulemanager.lua --- a/core/modulemanager.lua Sun Jan 26 18:35:03 2014 +0100 +++ b/core/modulemanager.lua Sun Jan 26 21:16:24 2014 +0100 @@ -29,7 +29,7 @@ return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); end -local autoload_modules = {"presence", "message", "iq", "offline", "c2s", "s2s"}; +local autoload_modules = {prosody.platform, "presence", "message", "iq", "offline", "c2s", "s2s"}; local component_inheritable_modules = {"tls", "dialback", "iq", "s2s"}; -- We need this to let modules access the real global namespace diff -r 3547f315a1f5 -r 28a90f5fea46 plugins/mod_unknown.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/mod_unknown.lua Sun Jan 26 21:16:24 2014 +0100 @@ -0,0 +1,4 @@ +-- Unknown platform stub +module:set_global(); + +-- TODO Do things that make sense if we don't know about the platform diff -r 3547f315a1f5 -r 28a90f5fea46 plugins/mod_windows.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/mod_windows.lua Sun Jan 26 21:16:24 2014 +0100 @@ -0,0 +1,4 @@ +-- Windows platform stub +module:set_global(); + +-- TODO Add Windows-specific things here