From a647fe86cf4a08a719c472fd977c8d231fee9033 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 18 Apr 2005 12:25:03 +0000 Subject: Fixed /LUSERS server count again git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1118 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/inspircd.cpp') 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::iterator j = me[i]->connectors.begin(); j != me[i]->connectors.end(); j++) { - for (vector::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; } -- cgit v1.2.3