* at this point
*/
+ if (!ServerInstance->Res)
+ ServerInstance->Res = new DNS(ServerInstance);
/** Note: This is safe, the method checks for user == NULL */
ServerInstance->Parser->SetupCommandTable(user);
ServerInstance->Modules->LoadAll();
{
for (std::vector<std::string>::iterator adding = added_modules.begin(); adding != added_modules.end(); adding++)
{
+ /* Skip over modules that are aleready loaded for some reason */
+ if (ServerInstance->Modules->Find(*adding))
+ continue;
+
if (bail)
printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n", adding->c_str());
return (TotalDownloaded < IncludedFiles.size());
}
+void ServerConfig::Complete(const std::string &filename, bool error)
+{
+ std::map<std::string, std::istream*>::iterator x = IncludedFiles.find(filename);
+
+ if (x != IncludedFiles.end())
+ {
+ TotalDownloaded++;
+ if (error)
+ {
+ delete x->second;
+ x->second = NULL;
+ FileErrors++;
+ }
+ }
+
+ return;
+}
+
void ServerConfig::StartDownloads()
{
if (isatty(0) && isatty(1) && isatty(2))
ServerInstance->Log(DEBUG,"Module-handled schema for %s", x->first.c_str());
/* For now, error it */
- FileErrors++;
- TotalDownloaded++;
- delete x->second;
- x->second = NULL;
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnDownloadFile, OnDownloadFile(file, x->second));
+ if (MOD_RESULT == 0)
+ {
+ /* No module claimed this file */
+ TotalDownloaded++;
+ FileErrors++;
+ delete x->second;
+ x->second = NULL;
+ }
}
}
}