]> arthur.barton.de Git - ngircd-alex.git/commitdiff
- neue Konfigurationsvariable "MaxConnections".
authorAlexander Barton <alex@barton.de>
Sat, 2 Nov 2002 22:59:01 +0000 (22:59 +0000)
committerAlexander Barton <alex@barton.de>
Sat, 2 Nov 2002 22:59:01 +0000 (22:59 +0000)
src/ngircd/conf.c

index 81ddb252a5e1f55a67655135e4bfcfa851e59d18..cf8b2684fb5b518ef310906b1ad6ec976f6e0349 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.
  *
- * $Id: conf.c,v 1.34 2002/10/21 13:45:07 alex Exp $
+ * $Id: conf.c,v 1.35 2002/11/02 22:59:01 alex Exp $
  *
  * conf.h: Konfiguration des ngircd
  */
@@ -104,6 +104,8 @@ Conf_Test( VOID )
        printf( "  PongTimeout = %d\n", Conf_PongTimeout );
        printf( "  ConnectRetry = %d\n", Conf_ConnectRetry );
        printf( "  OperCanUseMode = %s\n", Conf_OperCanMode == TRUE ? "yes" : "no" );
+       if( Conf_MaxConnections > 0 ) printf( "  MaxConnections = %ld\n", Conf_MaxConnections );
+       else printf( "  MaxConnections = -1\n" );
        puts( "" );
 
        for( i = 0; i < Conf_Oper_Count; i++ )
@@ -177,6 +179,8 @@ Set_Defaults( VOID )
        Conf_Channel_Count = 0;
 
        Conf_OperCanMode = FALSE;
+       
+       Conf_MaxConnections = 0;
 } /* Set_Defaults */
 
 
@@ -411,6 +415,13 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
                else Conf_OperCanMode = FALSE;
                return;
        }
+       if( strcasecmp( Var, "MaxConnections" ) == 0 )
+       {
+               /* Maximale Anzahl von Verbindungen. Werte <= 0 stehen
+                * fuer "kein Limit". */
+               Conf_MaxConnections = atol( Arg );
+               return;
+       }
                
        Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
 } /* Handle_GLOBAL */