]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
- Count_MyServers() zaehlt nun wieder richtig, LUSERS sollte nun wieder die
[ngircd-alex.git] / src / ngircd / client.c
index 1d08f47650ff02106191207d859bb503d7d2fbd8..b3b6118172f6bdcaf3906c9b41890f179354740d 100644 (file)
@@ -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.
  *
  * 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.52 2002/03/25 19:11:01 alex Exp $
+ * $Id: client.c,v 1.54 2002/04/14 13:54:51 alex Exp $
  *
  * client.c: Management aller Clients
  *
  *
  * client.c: Management aller Clients
  *
@@ -245,8 +245,8 @@ GLOBAL VOID Client_Destroy( CLIENT *Client, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN
                        {
                                if( c != This_Server )
                                {
                        {
                                if( c != This_Server )
                                {
-                                       if( c->conn_id != NONE ) Log( LOG_NOTICE, "Server \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
-                                       else Log( LOG_NOTICE, "Server \"%s\" unregistered: %s", c->id, txt );
+                                       if( c->conn_id != NONE ) Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
+                                       else Log( LOG_NOTICE|LOG_snotice, "Server \"%s\" unregistered: %s", c->id, txt );
                                }
 
                                /* andere Server informieren */
                                }
 
                                /* andere Server informieren */
@@ -798,7 +798,17 @@ GLOBAL INT Client_MyServiceCount( VOID )
 
 GLOBAL INT Client_MyServerCount( 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 */
 
 
 } /* Client_MyServerCount */
 
 
@@ -867,7 +877,7 @@ LOCAL INT Count( CLIENT_TYPE Type )
        c = My_Clients;
        while( c )
        {
        c = My_Clients;
        while( c )
        {
-               if( c && ( c->type == Type )) cnt++;
+               if( c->type == Type ) cnt++;
                c = (CLIENT *)c->next;
        }
        return cnt;
                c = (CLIENT *)c->next;
        }
        return cnt;
@@ -883,7 +893,7 @@ LOCAL INT MyCount( CLIENT_TYPE Type )
        c = My_Clients;
        while( c )
        {
        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;
                c = (CLIENT *)c->next;
        }
        return cnt;