diff options
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 21113b4f4..ad5e46905 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2458,23 +2458,19 @@ long chancount(void) long count_servs(void) { int c = 0; - for (int j = 0; j < 255; j++) - { - for (int i = 0; i < 32; i++) + for (int i = 0; i < 32; i++) + { + if (me[i] != NULL) { - if (me[i] != NULL) + for (vector<ircd_connector>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++) { - for (vector<ircd_connector>::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++) + if (strcasecmp(j->GetServerName().c_str(),ServerName)) { - if (strcasecmp(j->GetServerName().c_str(),ServerName)) - { - c++; - } + c++; } } } - - } + } return c; } |