]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Fixed usercounts to not screw up on remote users
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index cfb96cca2e953668528dbb1cb8241904f616f0f0..ea7b1f9dc574c84ae7e482fad24eebb84b9a04d7 100644 (file)
@@ -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;
 }