diff options
| author | 2004-04-11 14:31:16 +0000 | |
|---|---|---|
| committer | 2004-04-11 14:31:16 +0000 | |
| commit | e32ed2b7288f518a3cd6d42330875ed278a4a4fd (patch) | |
| tree | 6f82e3af0214ca0680e492c7f45a1317f532ec7a /src/inspircd.cpp | |
| parent | Added quick reference to token types (diff) | |
| download | inspircd++-e32ed2b7288f518a3cd6d42330875ed278a4a4fd.tar.gz inspircd++-e32ed2b7288f518a3cd6d42330875ed278a4a4fd.tar.bz2 inspircd++-e32ed2b7288f518a3cd6d42330875ed278a4a4fd.zip | |
Fixes to lusers and map
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@529 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 23 |
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); |
