diff options
| author | 2007-11-11 18:27:25 +0000 | |
|---|---|---|
| committer | 2007-11-11 18:27:25 +0000 | |
| commit | d1323ef03f90dc0a4b82137f2573b60a85cc965c (patch) | |
| tree | 90a69ba836d5eb05c193bc1a8441d23b62861b8a /src/configreader.cpp | |
| parent | More stuff for this. Its starting to take shape a bit now, and is tidier than... (diff) | |
This works properly now. Files in the file:// schema are loaded by the core.
Anything else will be loaded by a module, this isnt done yet. For remote includes to work,
your <module> tags for the remote includes modules must be in the base inspircd.conf file.
This is the only file gauranteed to be avaialble in pass 1 of the two pass config read.
At the end of pass 1, all files are opened/downloaded and placed into a map.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8568 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
| -rw-r--r-- | src/configreader.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 2852dc727..72f1d3203 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1208,6 +1208,9 @@ void ServerConfig::Read(bool bail, User* user, int pass) { for (std::vector<std::string>::iterator adding = added_modules.begin(); adding != added_modules.end(); adding++) { + if (bail) + printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n", adding->c_str()); + if (ServerInstance->Modules->Load(adding->c_str())) { ServerInstance->WriteOpers("*** REHASH LOADED MODULE: %s",adding->c_str()); @@ -1220,14 +1223,17 @@ void ServerConfig::Read(bool bail, User* user, int pass) { if (user) user->WriteServ("974 %s %s :%s",user->nick, adding->c_str(), ServerInstance->Modules->LastError().c_str()); + + if (bail) + { + printf_c("\n[\033[1;31m*\033[0m] %s\n\n", ServerInstance->Modules->LastError().c_str()); + ServerInstance->Exit(EXIT_STATUS_MODULE); + } } } } - ServerInstance->Log(DEFAULT,"Successfully unloaded %lu of %lu modules and loaded %lu of %lu modules in pass 2.",(unsigned long)rem,(unsigned long)removed_modules.size(),(unsigned long)add,(unsigned long)added_modules.size()); - - /** Note: This is safe, the method checks for user == NULL */ - /*ServerInstance->Parser->SetupCommandTable(user);*/ + ServerInstance->Log(DEFAULT,"Successfully unloaded %lu of %lu modules and loaded %lu of %lu modules.",(unsigned long)rem,(unsigned long)removed_modules.size(),(unsigned long)add,(unsigned long)added_modules.size()); if (user) user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick); @@ -1237,8 +1243,9 @@ void ServerConfig::Read(bool bail, User* user, int pass) bool ServerConfig::Downloading() { + ServerInstance->Log(DEBUG, "ServerConfig::Downloading() TotalDownloaded %u of %u", TotalDownloaded, IncludedFiles.size()); /* Returns true if there are still files in the process of downloading */ - return (TotalDownloaded >= IncludedFiles.size()); + return (TotalDownloaded < IncludedFiles.size()); } void ServerConfig::StartDownloads() |
