]> arthur.barton.de Git - ngircd-alex.git/commitdiff
configtest would still print "-1" for MaxConnections, MaxConnectionsIP and MaxJoins
authorFlorian Westphal <fw@strlen.de>
Wed, 24 Oct 2007 00:48:41 +0000 (00:48 +0000)
committerFlorian Westphal <fw@strlen.de>
Wed, 24 Oct 2007 00:48:41 +0000 (00:48 +0000)
if any of those values was set to 0.

src/ngircd/conf.c

index a6fc76317d1f253d545b2e9f67a6477c06d02f6e..3c7b42d5063d7d90b8d260a308af9db1bef1f98b 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conf.c,v 1.99 2007/10/13 19:11:06 fw Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.100 2007/10/24 00:48:41 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -205,9 +205,9 @@ Conf_Test( void )
        printf( "  OperCanUseMode = %s\n", Conf_OperCanMode == true ? "yes" : "no" );
        printf( "  OperServerMode = %s\n", Conf_OperServerMode == true? "yes" : "no" );
        printf( "  PredefChannelsOnly = %s\n", Conf_PredefChannelsOnly == true ? "yes" : "no" );
-       printf( "  MaxConnections = %ld\n", Conf_MaxConnections>0 ? Conf_MaxConnections : -1);
-       printf( "  MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP>0 ? Conf_MaxConnectionsIP : -1);
-       printf( "  MaxJoins = %d\n\n", Conf_MaxJoins>0 ? Conf_MaxJoins : -1);
+       printf( "  MaxConnections = %ld\n", Conf_MaxConnections);
+       printf( "  MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
+       printf( "  MaxJoins = %d\n\n", Conf_MaxJoins);
 
        for( i = 0; i < Conf_Oper_Count; i++ ) {
                if( ! Conf_Oper[i].name[0] ) continue;
@@ -447,7 +447,7 @@ Set_Defaults( bool InitServers )
        Conf_PredefChannelsOnly = false;
        Conf_OperServerMode = false;
 
-       Conf_MaxConnections = -1;
+       Conf_MaxConnections = 0;
        Conf_MaxConnectionsIP = 5;
        Conf_MaxJoins = 10;