summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 14:06:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 14:06:41 +0000
commit4a1611a5c0fa1947e72e05e240f11cc10ba56e06 (patch)
tree63b1074ebdace37950e9ad9e6ebf78ee58d5e6b8
parent4ee16daf7ccf5940d690c67f5275efc564bbed69 (diff)
Added quick reference to token types
Added more stuff to /MAP git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@528 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index d481b29da..f66ead573 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -4903,14 +4903,25 @@ int usercount_unknown(void)
return c;
}
-int chancount(void)
+long chancount(void)
{
return chanlist.size();
}
-int servercount(void)
+long count_servs(void)
{
- return 1;
+ c = 0;
+ for (int j = 0; j < 255; j++)
+ {
+ if (servers[j] != NULL)
+ c++;
+ }
+ return c;
+}
+
+long servercount(void)
+{
+ return count_servs()+1;
}
void handle_lusers(char **parameters, int pcnt, userrec *user)
@@ -4919,7 +4930,7 @@ void handle_lusers(char **parameters, int pcnt, userrec *user)
WriteServ(user->fd,"252 %s %d :operator(s) online",user->nick,usercount_opers());
WriteServ(user->fd,"253 %s %d :unknown connections",user->nick,usercount_unknown());
WriteServ(user->fd,"254 %s %d :channels formed",user->nick,chancount());
- WriteServ(user->fd,"254 %s :I have %d clients and 0 servers",user->nick,usercnt());
+ WriteServ(user->fd,"254 %s :I have %d clients and %d servers",user->nick,local_count(),count_servs());
}
void handle_admin(char **parameters, int pcnt, userrec *user)