X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=617d5a0fa64de280d5cdb6065e66312a9112c1c1;hb=ddbc70ec8e1fe30899458fa2c833a1e66fc9b14d;hp=41e4e2606a3d84a2334bb3bbc841ec4b5e74f27d;hpb=3039e0663f7e45a45e9574a6aa7463bbe77e849f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index 41e4e2606..617d5a0fa 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -356,7 +356,7 @@ bool ModuleManager::Load(const char* filename) { /* Try and locate and load all modules matching the pattern */ dirent* entry = NULL; - while ((entry = readdir(library))) + while (0 != (entry = readdir(library))) { if (Instance->MatchText(entry->d_name, filename)) { @@ -602,14 +602,12 @@ bool ModuleManager::PublishInterface(const std::string &InterfaceName, Module* M modulelist ml; ml.push_back(Mod); Interfaces[InterfaceName] = std::make_pair(0, ml); - return true; } else { iter->second.second.push_back(Mod); - return true; } - return false; + return true; } bool ModuleManager::UnpublishInterface(const std::string &InterfaceName, Module* Mod)