Changeset

6003:28a90f5fea46

modulemanager: Always load a platform-specific module, add stub modules for Windows and unknown platforms
author Kim Alvefur <zash@zash.se>
date Sun, 26 Jan 2014 21:16:24 +0100
parents 6002:3547f315a1f5
children 6004:09151d26560a
files core/modulemanager.lua plugins/mod_unknown.lua plugins/mod_windows.lua
diffstat 3 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- /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
--- /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