diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-18 18:39:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-18 18:39:17 +0000 |
commit | e80337c204adbe3ff4b38eafed777ba2f8bac6fb (patch) | |
tree | 9d5d599b17d2a100a488c553c83b119620be876c /src/helperfuncs.cpp | |
parent | 1c52b90e826ca3fdef6d55fccd7abbc4fdd90574 (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.cpp | 8 |
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() |