]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf.c
New configuration option "NoIdent" to disable IDENT lookups
[ngircd-alex.git] / src / ngircd / conf.c
index 97ecb10ff0176edf525a99b05e87eb1661942dcc..fe0593803f1344c67831e48de3496cafd74a76d1 100644 (file)
@@ -259,6 +259,7 @@ Conf_Test( void )
        printf( "  OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
        printf( "  PredefChannelsOnly = %s\n", yesno_to_str(Conf_PredefChannelsOnly));
        printf( "  NoDNS = %s\n", yesno_to_str(Conf_NoDNS));
+       printf( "  NoIdent = %s\n", yesno_to_str(Conf_NoIdent));
 
 #ifdef WANT_IPV6
        printf("  ConnectIPv4 = %s\n", yesno_to_str(Conf_ConnectIPv6));
@@ -519,6 +520,7 @@ Set_Defaults( bool InitServers )
 
        Conf_OperCanMode = false;
        Conf_NoDNS = false;
+       Conf_NoIdent = false;
        Conf_PredefChannelsOnly = false;
        Conf_OperServerMode = false;
 
@@ -903,6 +905,19 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
                Conf_NoDNS = Check_ArgIsTrue( Arg );
                return;
        }
+       if (strcasecmp(Var, "NoIdent") == 0) {
+               /* don't do IDENT lookups when clients connect? */
+               Conf_NoIdent = Check_ArgIsTrue(Arg);
+#ifndef IDENTAUTH
+               if (!Conf_NoIdent) {
+                       /* user has enabled ident lookups explicitly, but ... */
+                       Config_Error(LOG_WARNING,
+                               "%s: line %d: NoIdent=False, but ngircd was built without IDENT support",
+                               NGIRCd_ConfFile, Line);
+               }
+#endif
+               return;
+       }
 #ifdef WANT_IPV6
        /* the default setting for all the WANT_IPV6 special options is 'true' */
        if( strcasecmp( Var, "ConnectIPv6" ) == 0 ) {