text client <.A>ide <S>ysconfig <I>nternet , when encountering a "directory" domain...
[citadel.git] / textclient / src / tuiconfig.c
index 85649c76b733ea1d13b38285ae657232f6abc2b8..d89ab9ccf3c31baee83dd5ba24186d3550527032 100644 (file)
@@ -427,6 +427,13 @@ void do_internet_configuration(CtdlIPC *ipc)
                while (!IsEmptyStr(resp)) {
                        extract_token(buf, resp, 0, '\n', sizeof buf);
                        remove_token(resp, 0, '\n');
+
+                       // VILE SLEAZY HACK: replace obsolete "directory" domains with "localhost"
+                       char *d = strstr(buf, "|directory");
+                       if (d != NULL) {
+                               strcpy(d, "|localhost");
+                       }
+
                        ++num_recs;
                        if (num_recs == 1) recs = malloc(sizeof(char *));
                        else recs = realloc(recs, (sizeof(char *)) * num_recs);