From: brain Date: Sun, 4 Dec 2005 15:02:00 +0000 (+0000) Subject: Fixed usercounts to not screw up on remote users X-Git-Tag: v2.0.23~9886 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=491e012cfdd78f1a705d52ca42377a8a39634640;hp=1817e4df761c5fb86473b7ce6aa341bc81077a72;p=user%2Fhenk%2Fcode%2Finspircd.git Fixed usercounts to not screw up on remote users git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2144 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index cfb96cca2..ea7b1f9dc 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -1046,7 +1046,7 @@ int registered_usercount(void) int c = 0; for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) { - if ((i->second->fd) && (isnick(i->second->nick))) c++; + if (i->second->registered == 7) c++; } return c; } @@ -1054,10 +1054,9 @@ int registered_usercount(void) int usercount_invisible(void) { int c = 0; - for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) { - if ((i->second->fd) && (isnick(i->second->nick)) && (strchr(i->second->modes,'i'))) c++; + if ((isnick(i->second->nick)) && (strchr(i->second->modes,'i'))) c++; } return c; } @@ -1065,10 +1064,9 @@ int usercount_invisible(void) int usercount_opers(void) { int c = 0; - for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) { - if ((i->second->fd) && (isnick(i->second->nick)) && (strchr(i->second->modes,'o'))) c++; + if ((isnick(i->second->nick)) && (strchr(i->second->modes,'o'))) c++; } return c; }