about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-04-14 13:54:51 +0000
committerAlexander Barton <alex@barton.de>2002-04-14 13:54:51 +0000
commit3be7b9ef59cf7425c87e4b44c7345287eb13c425 (patch)
tree994d4d88489d355b64a3019fcc5b6523a50bd810 /src
parentbd5de06c67e7a496819e3116854cefc25cb4267e (diff)
downloadngircd-3be7b9ef59cf7425c87e4b44c7345287eb13c425.tar.gz
ngircd-3be7b9ef59cf7425c87e4b44c7345287eb13c425.zip
- Count_MyServers() zaehlt nun wieder richtig, LUSERS sollte nun wieder die
  korrekte Anzahl eigener Server-Links anzeigen.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/client.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index 1b634e54..b3b61181 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: client.c,v 1.53 2002/03/27 20:52:58 alex Exp $
+ * $Id: client.c,v 1.54 2002/04/14 13:54:51 alex Exp $
  *
  * client.c: Management aller Clients
  *
@@ -798,7 +798,17 @@ GLOBAL INT Client_MyServiceCount( VOID )
 
 GLOBAL INT Client_MyServerCount( VOID )
 {
-	return MyCount( CLIENT_SERVER );
+	CLIENT *c;
+	INT cnt;
+
+	cnt = 0;
+	c = My_Clients;
+	while( c )
+	{
+		if(( c->type == CLIENT_SERVER ) && ( c->hops == 1 )) cnt++;
+		c = (CLIENT *)c->next;
+	}
+	return cnt;
 } /* Client_MyServerCount */
 
 
@@ -867,7 +877,7 @@ LOCAL INT Count( CLIENT_TYPE Type )
 	c = My_Clients;
 	while( c )
 	{
-		if( c && ( c->type == Type )) cnt++;
+		if( c->type == Type ) cnt++;
 		c = (CLIENT *)c->next;
 	}
 	return cnt;
@@ -883,7 +893,7 @@ LOCAL INT MyCount( CLIENT_TYPE Type )
 	c = My_Clients;
 	while( c )
 	{
-		if( c && ( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
+		if(( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
 		c = (CLIENT *)c->next;
 	}
 	return cnt;