Added #include for strings.h and added some casts to remove compiler warnings.
This commit is contained in:
parent
6cafa16a56
commit
cdb694aeb3
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: conf.c,v 1.62 2003/12/19 14:32:59 alex Exp $";
|
static char UNUSED id[] = "$Id: conf.c,v 1.63 2004/01/17 03:17:00 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -23,6 +23,7 @@ static char UNUSED id[] = "$Id: conf.c,v 1.62 2003/12/19 14:32:59 alex Exp $";
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
@ -620,7 +621,7 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ISDIGIT
|
#ifdef HAVE_ISDIGIT
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"ServerUID\" is not a number!", NGIRCd_ConfFile, Line );
|
if( ! isdigit( (INT)*Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"ServerUID\" is not a number!", NGIRCd_ConfFile, Line );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
Conf_UID = (UINT)atoi( Arg );
|
Conf_UID = (UINT)atoi( Arg );
|
||||||
|
@ -635,7 +636,7 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ISDIGIT
|
#ifdef HAVE_ISDIGIT
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"ServerGID\" is not a number!", NGIRCd_ConfFile, Line );
|
if( ! isdigit( (INT)*Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"ServerGID\" is not a number!", NGIRCd_ConfFile, Line );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
Conf_GID = (UINT)atoi( Arg );
|
Conf_GID = (UINT)atoi( Arg );
|
||||||
|
@ -688,7 +689,7 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
{
|
{
|
||||||
/* Maximum number of connections. Values <= 0 are equal to "no limit". */
|
/* Maximum number of connections. Values <= 0 are equal to "no limit". */
|
||||||
#ifdef HAVE_ISDIGIT
|
#ifdef HAVE_ISDIGIT
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxConnections\" is not a number!", NGIRCd_ConfFile, Line );
|
if( ! isdigit( (INT)*Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxConnections\" is not a number!", NGIRCd_ConfFile, Line );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
Conf_MaxConnections = atol( Arg );
|
Conf_MaxConnections = atol( Arg );
|
||||||
|
@ -698,7 +699,7 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
{
|
{
|
||||||
/* Maximum number of simoultanous connections from one IP. Values <= 0 are equal to "no limit". */
|
/* Maximum number of simoultanous connections from one IP. Values <= 0 are equal to "no limit". */
|
||||||
#ifdef HAVE_ISDIGIT
|
#ifdef HAVE_ISDIGIT
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxConnectionsIP\" is not a number!", NGIRCd_ConfFile, Line );
|
if( ! isdigit( (INT)*Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxConnectionsIP\" is not a number!", NGIRCd_ConfFile, Line );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
Conf_MaxConnectionsIP = atoi( Arg );
|
Conf_MaxConnectionsIP = atoi( Arg );
|
||||||
|
@ -708,7 +709,7 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
{
|
{
|
||||||
/* Maximum number of channels a user can join. Values <= 0 are equal to "no limit". */
|
/* Maximum number of channels a user can join. Values <= 0 are equal to "no limit". */
|
||||||
#ifdef HAVE_ISDIGIT
|
#ifdef HAVE_ISDIGIT
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxJoins\" is not a number!", NGIRCd_ConfFile, Line );
|
if( ! isdigit( (INT)*Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxJoins\" is not a number!", NGIRCd_ConfFile, Line );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
Conf_MaxJoins = atoi( Arg );
|
Conf_MaxJoins = atoi( Arg );
|
||||||
|
@ -801,7 +802,7 @@ Handle_SERVER( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
{
|
{
|
||||||
/* Server group */
|
/* Server group */
|
||||||
#ifdef HAVE_ISDIGIT
|
#ifdef HAVE_ISDIGIT
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"Group\" is not a number!", NGIRCd_ConfFile, Line );
|
if( ! isdigit( (INT)*Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"Group\" is not a number!", NGIRCd_ConfFile, Line );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
New_Server.group = atoi( Arg );
|
New_Server.group = atoi( Arg );
|
||||||
|
|
Loading…
Reference in New Issue