From: brain Date: Sun, 11 Apr 2004 13:47:47 +0000 (+0000) Subject: /MAP fixes X-Git-Tag: v2.0.23~11061 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=3c95615014d3356a4dea20db9c1b8d890232432b;p=user%2Fhenk%2Fcode%2Finspircd.git /MAP fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@526 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/inspircd.cpp b/src/inspircd.cpp index f44160abb..d481b29da 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -5386,7 +5386,7 @@ long map_count(serverrec* s) 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,s->name))) c++; + if ((i->second->fd) && (isnick(i->second->nick)) && (!strcasecmp(i->second->server,s->name))) c++; } return c; } @@ -5396,7 +5396,7 @@ 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++; + if ((i->second->fd) && (isnick(i->second->nick)) && (!strcasecmp(i->second->server,ServerName))) c++; } return c; } @@ -5418,7 +5418,7 @@ void handle_map(char **parameters, int pcnt, userrec *user) { char line[MAXBUF]; snprintf(line,MAXBUF,"006 %s :%s",user->nick,ServerName); - while (strlen(line) < 40) + while (strlen(line) < 50) strcat(line," "); WriteServ(user->fd,"%s%d (%.2f%%)",line,local_count(),(float)(((float)local_count()/(float)usercnt())*100)); for (int j = 0; j < 255; j++) @@ -5426,7 +5426,7 @@ void handle_map(char **parameters, int pcnt, userrec *user) if (servers[j] != NULL) { snprintf(line,MAXBUF,"006 %s :%c-%s",user->nick,islast(servers[j]),servers[j]->name); - while (strlen(line) < 40) + while (strlen(line) < 50) strcat(line," "); WriteServ(user->fd,"%s%d (%.2f%%)",line,map_count(servers[j]),(float)(((float)map_count(servers[j])/(float)usercnt())*100)); }