]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Backport fix for stripcolour not stripping colour codes, reported by jackmcbarn ...
[user/henk/code/inspircd.git] / src / modules.cpp
index 41e4e2606a3d84a2334bb3bbc841ec4b5e74f27d..617d5a0fa64de280d5cdb6065e66312a9112c1c1 100644 (file)
@@ -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)