#include "portab.h"
-static char UNUSED id[] = "$Id: conf.c,v 1.56 2003/04/20 23:09:43 alex Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.59 2003/04/29 12:36:09 alex Exp $";
#include "imp.h"
#include <assert.h>
puts( "[GLOBAL]" );
printf( " ServerName = %s\n", Conf_ServerName );
printf( " ServerInfo = %s\n", Conf_ServerInfo );
- printf( " ServerPwd = %s\n", Conf_ServerPwd );
+ printf( " Password = %s\n", Conf_ServerPwd );
printf( " AdminInfo1 = %s\n", Conf_ServerAdmin1 );
printf( " AdminInfo2 = %s\n", Conf_ServerAdmin2 );
printf( " AdminEMail = %s\n", Conf_ServerAdminMail );
Conf_GetServer( CONN_ID Idx )
{
/* Get index of server in configuration structure */
-
- INT i;
-
+
+ INT i = 0;
+
assert( Idx > NONE );
for( i = 0; i < MAX_SERVERS; i++ )
exit( 1 );
}
}
+
+ if( ! strchr( Conf_ServerName, '.' ))
+ {
+ /* No dot in server name! */
+ Config_Error( LOG_ALERT, "Invalid server name configured in \"%s\" ('ServerName'): Dot missing!", NGIRCd_ConfFile );
+ if( ! Configtest )
+ {
+ Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
+ exit( 1 );
+ }
+ }
#ifdef STRICT_RFC
if( ! Conf_ServerAdminMail[0] )