commit - 914d6a26d85ecaf7e0962c40392769cf4764e987
commit + 58a4dae56dd34e41b32dd3e5cede03a7ea5c7bb5
blob - 9a36843255bb7f0a5068c72daf13b398b8bd7076
blob + 5e334963975a660c92d95c7790054614aa5e9049
--- configure.in
+++ configure.in
bind gethostbyaddr gethostbyname gethostname inet_ntoa \
setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!]))
-AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton isdigit sigaction sigprocmask snprintf \
+AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton sigaction sigprocmask snprintf \
vsnprintf strdup strlcpy strlcat strtok_r)
# -- Configuration options --
blob - fa22df051c3addaa9ab029bd44dbad3197c65b89
blob + e1fb73be85244cec08fd4b0506805554d307fb6f
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
pwd = getpwnam( Arg );
if( pwd ) Conf_UID = pwd->pw_uid;
else {
-#ifdef HAVE_ISDIGIT
- if( ! isdigit( (int)*Arg )) Config_Error_NaN( Line, Var );
- else
-#endif
- Conf_UID = (unsigned int)atoi( Arg );
+ Conf_UID = (unsigned int)atoi( Arg );
+ if (!Conf_UID && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
}
return;
}
grp = getgrnam( Arg );
if( grp ) Conf_GID = grp->gr_gid;
else {
-#ifdef HAVE_ISDIGIT
- if( ! isdigit( (int)*Arg )) Config_Error_NaN( Line, Var );
- else
-#endif
- Conf_GID = (unsigned int)atoi( Arg );
+ Conf_GID = (unsigned int)atoi(Arg);
+ if (!Conf_GID && strcmp(Arg, "0"))
+ Config_Error_NaN( Line, Var );
}
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 );
+ if (!Conf_MaxConnections && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
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 );
+ if (!Conf_MaxConnectionsIP && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
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 );
+ if (!Conf_MaxJoins && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
return;
}
if( strcasecmp( Var, "MaxNickLength" ) == 0 ) {
#endif
if( strcasecmp( Var, "Group" ) == 0 ) {
/* Server group */
-#ifdef HAVE_ISDIGIT
- if( ! isdigit( (int)*Arg ))
- Config_Error_NaN( Line, Var );
- else
-#endif
New_Server.group = atoi( Arg );
+ if (!New_Server.group && strcmp(Arg, "0"))
+ Config_Error_NaN(Line, Var);
return;
}
if( strcasecmp( Var, "Passive" ) == 0 ) {
if( strcasecmp( Var, "MaxUsers" ) == 0 ) {
/* maximum user limit, mode l */
chan->maxusers = (unsigned long) atol(Arg);
- if (chan->maxusers == 0)
+ if (!chan->maxusers && strcmp(Arg, "0"))
Config_Error_NaN(Line, Var);
return;
}