]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf.c
Streamline handling of invalid and unset server name
[ngircd-alex.git] / src / ngircd / conf.c
index 59a8ef9e7e3821d1683fa40f44727ac601ec94b5..ef36a2fe5d1c1842c851624c5322c91979554084 100644 (file)
@@ -2234,7 +2234,8 @@ Validate_Config(bool Configtest, bool Rehash)
                break;
        } while (*(++ptr));
 
-       if (!Conf_ServerName[0]) {
+       if (!Conf_ServerName[0] || !strchr(Conf_ServerName, '.'))
+       {
                /* No server name configured! */
                config_valid = false;
                Config_Error(LOG_ALERT,
@@ -2248,20 +2249,6 @@ Validate_Config(bool Configtest, bool Rehash)
                }
        }
 
-       if (Conf_ServerName[0] && !strchr(Conf_ServerName, '.')) {
-               /* No dot in server name! */
-               config_valid = false;
-               Config_Error(LOG_ALERT,
-                            "Invalid server name configured in \"%s\" (section 'Global': 'Name'): 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]) {
                /* No administrative contact configured! */