X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=ca8be9fefebdc29d54a4e9881024b04eb38c10c7;hb=60a6385be43050bd09d502fdac1352c03e36b4a8;hp=7b033a64bbfd8e4215dacdc5d7a41156c800043e;hpb=64087572950e3331029922626fa8605273c27da3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 7b033a64b..ca8be9fef 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1208,6 +1208,10 @@ void ServerConfig::Read(bool bail, User* user, int pass) { for (std::vector::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()); @@ -1253,6 +1257,24 @@ bool ServerConfig::Downloading() return (TotalDownloaded < IncludedFiles.size()); } +void ServerConfig::Complete(const std::string &filename, bool error) +{ + std::map::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))