From e32ed2b7288f518a3cd6d42330875ed278a4a4fd Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 11 Apr 2004 14:31:16 +0000 Subject: Fixes to lusers and map git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@529 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/inspircd.cpp') 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); -- cgit v1.2.3