modulemanager: Load modules for components, too
[prosody.git] / util / pluginloader.lua
index 1bf22f626a447eff5a68a79c623d5603c4f0077b..696af34f2ef7404e8ebd93a74508ac1736a8ca6f 100644 (file)
@@ -1,3 +1,11 @@
+-- Prosody IM
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
+-- 
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
 
 local plugin_dir = CFG_PLUGINDIR or "./plugins/";
 
@@ -27,7 +35,7 @@ end
 function load_code(plugin, resource)
        local content, err = load_resource(plugin, resource);
        if not content then return content, err; end
-       return loadstring(content, err), err;
+       return loadstring(content, "@"..err);
 end
 
 return _M;