diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-16 03:29:04 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-16 03:29:04 +0200 |
commit | cbd8fb1d890ba31e607de81fbb49da80498cc61e (patch) | |
tree | 63e78701d8f93070b0af2ddccb42c5d0019942c8 /src | |
parent | b6f7d36a544a7a8c18c815ef4158cf684108d06d (diff) | |
download | mad-cbd8fb1d890ba31e607de81fbb49da80498cc61e.tar mad-cbd8fb1d890ba31e607de81fbb49da80498cc61e.zip |
mad-server: Load modules in config file
Diffstat (limited to 'src')
-rw-r--r-- | src/Common/ModuleManager.cpp | 2 | ||||
-rw-r--r-- | src/mad-server.conf | 8 | ||||
-rw-r--r-- | src/mad-server.cpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Common/ModuleManager.cpp b/src/Common/ModuleManager.cpp index fc82ea8..551229c 100644 --- a/src/Common/ModuleManager.cpp +++ b/src/Common/ModuleManager.cpp @@ -59,7 +59,7 @@ bool ModuleManager::handleConfigEntry(const Core::ConfigEntry &entry, bool handl if(handled) return false; - if(entry[0].getKey().matches("LoadModule")) { + if(entry[0].getKey().matches("LoadModule") && entry[1].empty()) { if(!loadModule(entry[0][0].c_str())) application->logf(Core::LoggerBase::ERROR, "Can't load module '%s'.", entry[0][0].c_str()); diff --git a/src/mad-server.conf b/src/mad-server.conf index cca8e3a..b419a42 100644 --- a/src/mad-server.conf +++ b/src/mad-server.conf @@ -1,3 +1,11 @@ +LoadModule "FileLogger" +LoadModule "SystemBackendPosix" +LoadModule "SystemBackendProc" + +LoadModule "UserDBBackendMysql" +LoadModule "UserConfigBackendHome" +LoadModule "UserConfigBackendKrb5" + Logger Console Logger File "mad-server.log" diff --git a/src/mad-server.cpp b/src/mad-server.cpp index 1700d1f..4bc5087 100644 --- a/src/mad-server.cpp +++ b/src/mad-server.cpp @@ -28,14 +28,6 @@ using namespace Mad; int main() { Server::Application application; - application.getModuleManager()->loadModule("FileLogger"); - application.getModuleManager()->loadModule("SystemBackendPosix"); - application.getModuleManager()->loadModule("SystemBackendProc"); - - application.getModuleManager()->loadModule("UserDBBackendMysql"); - application.getModuleManager()->loadModule("UserConfigBackendHome"); - application.getModuleManager()->loadModule("UserConfigBackendKrb5"); - application.getConfigManager()->loadFile("mad-server.conf"); application.getConfigManager()->finish(); |