summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-19 14:56:45 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-19 14:56:45 +0000
commit6cfed50a536c385f3589852ae85b9b220da4b309 (patch)
tree49d6ff8360ebb409f12544626dc716efde20bb6d /src/inspircd.cpp
parent95a3d0c0801b9f15b62f793de9014c6dce450d8a (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/inspircd.cpp')
-rw-r--r--src/inspircd.cpp7
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()