mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 20:19:02 -04:00
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
This commit is contained in:
parent
3475ebe194
commit
35211d4c3e
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user