From 23fb1f062bc993bdce30f643b905105fd2f1b78e Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 24 Feb 2008 15:55:23 +0000 Subject: 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 --- src/modules.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'src/modules.cpp') 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; } -- cgit v1.2.3