From 6cfed50a536c385f3589852ae85b9b220da4b309 Mon Sep 17 00:00:00 2001 From: peavey Date: Wed, 19 Mar 2008 14:56:45 +0000 Subject: 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 --- src/inspircd.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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() -- cgit v1.2.3