]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
LoadModule will now also return false if the glob pattern matches no modules and...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 2 Nov 2006 18:07:23 +0000 (18:07 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 2 Nov 2006 18:07:23 +0000 (18:07 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5627 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspircd.cpp

index 055e42a7321a980d7b75b6e9b0bb31814cc385de..91681235794c6e3088957dea50a76d0d3d951b3f 100644 (file)
@@ -540,6 +540,7 @@ bool InspIRCd::LoadModule(const char* filename)
        if (strchr(filename,'*') || (strchr(filename,'?')))
        {
                bool all_success = true;
+               int n_match = 0;
                DIR* library = opendir(Config->ModPath);
                if (library)
                {
@@ -548,13 +549,14 @@ bool InspIRCd::LoadModule(const char* filename)
                        {
                                if (this->MatchText(entry->d_name, filename))
                                {
+                                       n_match++;
                                        if (!this->LoadModule(entry->d_name))
                                                all_success = false;
                                }
                        }
                        closedir(library);
                }
-               return all_success;
+               return (all_success && n_match);
        }
 
        char modfile[MAXBUF];