From e80337c204adbe3ff4b38eafed777ba2f8bac6fb Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 18 Dec 2006 18:39:17 +0000 Subject: Really clever VOODOO. RegisteredUserCount() used to take longer to execute than UnregisteredUserCount(), as all unregged users are local, so you only need to count in the local vector not the global map. Therefore, make RegisteredUserCount() just return this: this->UnregisteredUserCount() - clientlist.size() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6043 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index e9ae9168e..d96c068ed 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -312,13 +312,7 @@ int InspIRCd::UserCount() int InspIRCd::RegisteredUserCount() { int c = 0; - - for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) - { - c += (i->second->registered == REG_ALL); - } - - return c; + return this->UnregisteredUserCount() - clientlist.size(); } int InspIRCd::InvisibleUserCount() -- cgit v1.2.3