added basic ssl support to ircu
[ircu2.10.12-pk.git] / ircd / convert-conf.c
index 7947fff9f1b318dc12d29d4dbd6d5651b1ee5d9a..2e103eacf05c8b0d17c0ca8428ec3d7d89a81d80 100644 (file)
@@ -213,12 +213,11 @@ static void finish_connects(void)
     {
         for (sl = conn->origins; sl; sl = sl->next)
             fprintf(stdout, "# %s\n", sl->value);
-       if (conn->name == NULL
-            || conn->host == NULL
+       if (conn->host == NULL
             || conn->password == NULL
             || conn->class == NULL)
         {
-           fprintf(stderr, "H:line missing C:line for %s\n",sl->value);
+           fprintf(stderr, "H:line missing C:line for %s\n", conn->name);
            continue;
        }
 
@@ -354,6 +353,14 @@ static void finish_features(void)
             continue;
         }
 
+        /* If it had no value before, drop it now since the lexer does
+         * not accept empty strings and the grammar does not accept
+         * empty stringlists.*/
+        if (!feat->values) {
+            fprintf(stdout, "# Above feature had no value.\n");
+            continue;
+        }
+
         /* Wasn't remapped, wasn't removed: print it out. */
         fprintf(stdout, "\t\"%s\" =", feat->name);
         for (sl = feat->values; sl; sl = sl->next)