From f73e31b9c2bcade1f146ff957117ae02e15f537e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 26 Jan 2014 21:16:24 +0100 Subject: modulemanager: Always load a platform-specific module, add stub modules for Windows and unknown platforms --- core/modulemanager.lua | 2 +- plugins/mod_unknown.lua | 4 ++++ plugins/mod_windows.lua | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 plugins/mod_unknown.lua create mode 100644 plugins/mod_windows.lua diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 2ad2fc17..2e488fd5 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -29,7 +29,7 @@ pcall = function(f, ...) 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 --git a/plugins/mod_unknown.lua b/plugins/mod_unknown.lua new file mode 100644 index 00000000..4d20b8ad --- /dev/null +++ b/plugins/mod_unknown.lua @@ -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 --git a/plugins/mod_windows.lua b/plugins/mod_windows.lua new file mode 100644 index 00000000..8085fd88 --- /dev/null +++ b/plugins/mod_windows.lua @@ -0,0 +1,4 @@ +-- Windows platform stub +module:set_global(); + +-- TODO Add Windows-specific things here -- cgit v1.2.3