summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-24 15:55:23 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-24 15:55:23 +0000
commit23fb1f062bc993bdce30f643b905105fd2f1b78e (patch)
tree2df579fd1601694bb05049623e4864a1202afe75 /src/modules.cpp
parent4f50b9dfb1ca58cdceaad7578b48aa1ced186008 (diff)
Rollback complete! Everyone please go through the code and check i havent forgotten to incorporate your tweaks and changes.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9019 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index c3315490e..6271213fd 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -551,17 +551,14 @@ void ModuleManager::LoadAll()
for(int count = 0; count < Instance->Config->ConfValueEnum(Instance->Config->config_data, "module"); count++)
{
- if (!this->Find(configToken))
+ Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
+ printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
+
+ if (!this->Load(configToken))
{
- Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
- printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
-
- if (!this->Load(configToken))
- {
- Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
- printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
- Instance->Exit(EXIT_STATUS_MODULE);
- }
+ Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
+ printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
+ Instance->Exit(EXIT_STATUS_MODULE);
}
}
}
@@ -826,11 +823,8 @@ ConfigReader::ConfigReader(InspIRCd* Instance, const std::string &filename) : Se
this->data = new ConfigDataHash;
this->privatehash = true;
this->errorlog = new std::ostringstream(std::stringstream::in | std::stringstream::out);
- for (int pass = 0; pass < 2; pass++)
- {
- /*** XXX: Can return a 'not ready yet!' code! */
- this->readerror = ServerInstance->Config->LoadConf(*this->data, filename, *this->errorlog, pass);
- }
+ /*** XXX: Can return a 'not ready yet!' code! */
+ this->readerror = ServerInstance->Config->LoadConf(*this->data, filename, *this->errorlog);
if (!this->readerror)
this->error = CONF_FILE_NOT_FOUND;
}