summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 14:31:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 14:31:16 +0000
commite32ed2b7288f518a3cd6d42330875ed278a4a4fd (patch)
tree6f82e3af0214ca0680e492c7f45a1317f532ec7a
parent4a1611a5c0fa1947e72e05e240f11cc10ba56e06 (diff)
Fixes to lusers and map
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@529 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index f66ead573..0d09c22d4 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -4910,7 +4910,7 @@ long chancount(void)
long count_servs(void)
{
- c = 0;
+ int c = 0;
for (int j = 0; j < 255; j++)
{
if (servers[j] != NULL)
@@ -4924,6 +4924,17 @@ long servercount(void)
return count_servs()+1;
}
+long local_count()
+{
+ int c = 0;
+ for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
+ {
+ if ((i->second->fd) && (isnick(i->second->nick)) && (!strcasecmp(i->second->server,ServerName))) c++;
+ }
+ return c;
+}
+
+
void handle_lusers(char **parameters, int pcnt, userrec *user)
{
WriteServ(user->fd,"251 %s :There are %d users and %d invisible on %d servers",user->nick,usercnt()-usercount_invisible(),usercount_invisible(),servercount());
@@ -5402,16 +5413,6 @@ long map_count(serverrec* s)
return c;
}
-long local_count()
-{
- int c = 0;
- for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
- {
- if ((i->second->fd) && (isnick(i->second->nick)) && (!strcasecmp(i->second->server,ServerName))) c++;
- }
- return c;
-}
-
void handle_links(char **parameters, int pcnt, userrec *user)
{
WriteServ(user->fd,"364 %s %s %s :0 %s",user->nick,ServerName,ServerName,ServerDesc);