+ if( strcasecmp( Var, "NoDNS" ) == 0 ) {
+ /* don't do reverse dns lookups when clients connect? */
+ 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 ) {
+ /* connect to other hosts using ipv6, if they have an AAAA record? */
+ Conf_ConnectIPv6 = Check_ArgIsTrue( Arg );
+ return;
+ }
+ if( strcasecmp( Var, "ConnectIPv4" ) == 0 ) {
+ /* connect to other hosts using ipv4.
+ * again, this can be used for ipv6-only setups */
+ Conf_ConnectIPv4 = Check_ArgIsTrue( Arg );
+ return;
+ }
+#endif
+ if( strcasecmp( Var, "OperCanUseMode" ) == 0 ) {
+ /* Are IRC operators allowed to use MODE in channels they aren't Op in? */
+ Conf_OperCanMode = Check_ArgIsTrue( Arg );
+ return;
+ }
+ if( strcasecmp( Var, "OperServerMode" ) == 0 ) {
+ /* Mask IRC operator as if coming from the server? (ircd-irc2 compat hack) */
+ Conf_OperServerMode = Check_ArgIsTrue( Arg );
+ return;
+ }
+ if( strcasecmp( Var, "MaxConnections" ) == 0 ) {
+ /* Maximum number of connections. 0 -> "no limit". */
+#ifdef HAVE_ISDIGIT
+ if( ! isdigit( (int)*Arg )) Config_Error_NaN( Line, Var);
+ else
+#endif
+ Conf_MaxConnections = atol( Arg );
+ return;
+ }
+ if( strcasecmp( Var, "MaxConnectionsIP" ) == 0 ) {
+ /* Maximum number of simultaneous connections from one IP. 0 -> "no limit" */
+#ifdef HAVE_ISDIGIT
+ if( ! isdigit( (int)*Arg )) Config_Error_NaN( Line, Var );
+ else
+#endif
+ Conf_MaxConnectionsIP = atoi( Arg );
+ return;
+ }
+ if( strcasecmp( Var, "MaxJoins" ) == 0 ) {
+ /* Maximum number of channels a user can join. 0 -> "no limit". */
+#ifdef HAVE_ISDIGIT
+ if( ! isdigit( (int)*Arg )) Config_Error_NaN( Line, Var );
+ else
+#endif
+ Conf_MaxJoins = atoi( Arg );
+ return;
+ }
+ if( strcasecmp( Var, "MaxNickLength" ) == 0 ) {
+ /* Maximum length of a nick name; must be same on all servers
+ * within the IRC network! */
+ Conf_MaxNickLength = Handle_MaxNickLength(Line, Arg);
+ return;
+ }
+
+ if( strcasecmp( Var, "Listen" ) == 0 ) {
+ /* IP-Address to bind sockets */
+ if (Conf_ListenAddress) {
+ Config_Error(LOG_ERR, "Multiple Listen= options, ignoring: %s", Arg);
+ return;
+ }
+ Conf_ListenAddress = strdup_warn(Arg);
+ /*
+ * if allocation fails, we're in trouble:
+ * we cannot ignore the error -- otherwise ngircd
+ * would listen on all interfaces.
+ */
+ if (!Conf_ListenAddress) {
+ Config_Error(LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME);
+ exit(1);
+ }
+ return;
+ }
+
+#ifdef SSL_SUPPORT
+ if( strcasecmp( Var, "SSLPorts" ) == 0 ) {
+ ports_parse(&Conf_SSLOptions.ListenPorts, Line, Arg);
+ return;
+ }
+
+ if( strcasecmp( Var, "SSLKeyFile" ) == 0 ) {
+ assert(Conf_SSLOptions.KeyFile == NULL );
+ Conf_SSLOptions.KeyFile = strdup_warn(Arg);
+ return;
+ }
+ if( strcasecmp( Var, "SSLCertFile" ) == 0 ) {
+ assert(Conf_SSLOptions.CertFile == NULL );
+ Conf_SSLOptions.CertFile = strdup_warn(Arg);
+ return;
+ }
+
+ if( strcasecmp( Var, "SSLKeyFilePassword" ) == 0 ) {
+ assert(array_bytes(&Conf_SSLOptions.KeyFilePassword) == 0);
+ if (!array_copys(&Conf_SSLOptions.KeyFilePassword, Arg))
+ Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Could not copy %s: %s!",
+ NGIRCd_ConfFile, Line, Var, strerror(errno));
+ return;
+ }
+ if( strcasecmp( Var, "SSLDHFile" ) == 0 ) {
+ assert(Conf_SSLOptions.DHFile == NULL);
+ Conf_SSLOptions.DHFile = strdup_warn( Arg );
+ return;
+ }
+#endif
+ Config_Error(LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!",
+ NGIRCd_ConfFile, Line, Var);