diff options
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); |