From 6ea2571433dea02a2009dbe7a5e12241c4efc73b Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 19 Mar 2008 00:22:01 +0000 Subject: Fix bug here too where if two modules claim OnCheckReady, the core permits registration when the first of the set is ready, not when all are ready git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@9129 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5868cf787..20f9a0f5b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1184,6 +1184,8 @@ int main(int argc, char** argv) */ bool InspIRCd::AllModulesReportReady(userrec* user) { + size_t ready = 0, total = 0; + if (!Config->global_implementation[I_OnCheckReady]) return true; @@ -1191,12 +1193,12 @@ bool InspIRCd::AllModulesReportReady(userrec* user) { if (Config->implement_lists[i][I_OnCheckReady]) { - int res = modules[i]->OnCheckReady(user); - if (!res) - return false; + if (modules[i]->OnCheckReady(user)) + ready++; + total++; } } - return true; + return (ready == total); } int InspIRCd::GetModuleCount() -- cgit v1.3.1-10-gc9f91