about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2003-04-29 12:36:09 +0000
committerAlexander Barton <alex@barton.de>2003-04-29 12:36:09 +0000
commite541da2a8fb12a19b819f06d67403c094e474206 (patch)
tree34722b6d6936ce6826219f3c7bee14ec5d8ad802 /src
parente55399c6670173afffa0a8b334d77f0d44710b43 (diff)
downloadngircd-e541da2a8fb12a19b819f06d67403c094e474206.tar.gz
ngircd-e541da2a8fb12a19b819f06d67403c094e474206.zip
"ServerName" is checked better now: a dot (".") is required.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conf.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 9587b5fa..00b5bb79 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conf.c,v 1.58 2003/04/27 11:46:52 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>
@@ -837,6 +837,17 @@ Validate_Config( BOOLEAN Configtest )
 			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] )