diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-19 14:56:45 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-19 14:56:45 +0000 |
commit | 6cfed50a536c385f3589852ae85b9b220da4b309 (patch) | |
tree | 49d6ff8360ebb409f12544626dc716efde20bb6d /src | |
parent | 95a3d0c0801b9f15b62f793de9014c6dce450d8a (diff) |
Ricer up AllModulesReportReady further. If one fails, all fail, so returning false on first fail will save subsequent reduntant calls.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9138 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index be4bc012e..765ee71fd 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -764,13 +764,12 @@ int main(int argc, char ** argv) */ bool InspIRCd::AllModulesReportReady(User* user) { - size_t ready = 0; for (EventHandlerIter i = Modules->EventHandlers[I_OnCheckReady].begin(); i != Modules->EventHandlers[I_OnCheckReady].end(); ++i) { - if ((*i)->OnCheckReady(user)) - ready++; + if (!(*i)->OnCheckReady(user)) + return false; } - return (ready == Modules->EventHandlers[I_OnCheckReady].size()); + return true; } time_t InspIRCd::Time() |