summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-02 18:07:23 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-02 18:07:23 +0000
commit35211d4c3e3db8419c831e450ad463a8542ac117 (patch)
tree720296dc5961e4ca09b5ef129c8319c8a91f82f8 /src
parent3475ebe194f0be23eb70cb496cbc8ebbae775163 (diff)
LoadModule will now also return false if the glob pattern matches no modules and loads nothing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5627 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 055e42a73..916812357 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -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];