]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf.c
New config option NoDNS: disables all DNS queries.
[ngircd-alex.git] / src / ngircd / conf.c
index 3c7b42d5063d7d90b8d260a308af9db1bef1f98b..c9643dad491d75c5abefb7af49a7431ef31f1991 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conf.c,v 1.100 2007/10/24 00:48:41 fw Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.101 2007/10/25 11:01:19 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -205,6 +205,7 @@ 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( "  NoDNS = %s\n", Conf_NoDNS ? "yes" : "no");
        printf( "  MaxConnections = %ld\n", Conf_MaxConnections);
        printf( "  MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
        printf( "  MaxJoins = %d\n\n", Conf_MaxJoins);
@@ -444,6 +445,7 @@ Set_Defaults( bool InitServers )
        Conf_Channel_Count = 0;
 
        Conf_OperCanMode = false;
+       Conf_NoDNS = false;
        Conf_PredefChannelsOnly = false;
        Conf_OperServerMode = false;
 
@@ -783,6 +785,11 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
                Conf_PredefChannelsOnly = Check_ArgIsTrue( Arg );
                return;
        }
+       if( strcasecmp( Var, "NoDNS" ) == 0 ) {
+               /* don't do reverse dns lookups when clients connect? */
+               Conf_NoDNS = Check_ArgIsTrue( Arg );
+               return;
+       }
        if( strcasecmp( Var, "OperCanUseMode" ) == 0 ) {
                /* Are IRC operators allowed to use MODE in channels they aren't Op in? */
                Conf_OperCanMode = Check_ArgIsTrue( Arg );