]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
More stuff
[user/henk/code/inspircd.git] / src / configreader.cpp
index 13ef5ddadab82c42631be17929e05ec49f60c8db..ec5f1fe5481f88393cd2d639c97cefb8d2cae076 100644 (file)
@@ -1296,10 +1296,16 @@ void ServerConfig::StartDownloads()
                        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, reinterpret_cast<std::istringstream*>(x->second)));
+                       if (MOD_RESULT == 0)
+                       {
+                               /* No module claimed this file */
+                               TotalDownloaded++;
+                               FileErrors++;
+                               delete x->second;
+                               x->second = NULL;
+                       }
                }
        }
 }