prosody: Don't attempt to load core.xmlhandlers in the main file. It no longer exists.
[prosody.git] / prosody
diff --git a/prosody b/prosody
index 8e96eb46ac88d1cfdc42bf146a0570928686bd17..671910df199df677d8ad7121221565bc01ef417c 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -144,6 +144,10 @@ function set_function_metatable()
                        debug.setupvalue(f, i, value);
                end
        end
+       function mt.__tostring(f)
+               local info = debug.getinfo(f);
+               return ("function(%s:%d)"):format(info.short_src:match("[^\\/]*$"), info.linedefined);
+       end
        debug.setmetatable(function() end, mt);
 end
 
@@ -281,13 +285,17 @@ end
 function load_secondary_libraries()
        --- Load and initialise core modules
        require "util.import"
-       require "core.xmlhandlers"
+       require "util.xmppstream"
        require "core.rostermanager"
        require "core.hostmanager"
        require "core.modulemanager"
        require "core.usermanager"
        require "core.sessionmanager"
        require "core.stanza_router"
+       package.loaded['core.componentmanager'] = setmetatable({},{__index=function()
+               log("warn", "componentmanager is deprecated: %s", debug.traceback():match("\n[^\n]*\n[\s\t]*([^\n]*)"));
+               return function() end
+       end});
 
        require "net.http"
        
@@ -321,6 +329,7 @@ function init_data_store()
                end
                return username, host, datastore, data;
        end);
+       require "core.storagemanager";
 end
 
 function prepare_to_start()