summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-18 18:39:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-18 18:39:17 +0000
commite80337c204adbe3ff4b38eafed777ba2f8bac6fb (patch)
tree9d5d599b17d2a100a488c553c83b119620be876c /src/helperfuncs.cpp
parent1c52b90e826ca3fdef6d55fccd7abbc4fdd90574 (diff)
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
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp8
1 files changed, 1 insertions, 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()