New op #3 to list_maint() (get list name).

This commit is contained in:
default 2024-05-07 20:51:24 +02:00
parent 82ec4ea95c
commit 3355d5559d

13
data.c
View file

@ -1829,6 +1829,19 @@ xs_val *list_maint(snac *user, const char *list, int op)
} }
} }
break;
case 3: /** get list name **/
if (xs_is_hex(list)) {
FILE *f;
xs *fn = xs_fmt("%s/list/%s.id", user->basedir, list);
if ((f = fopen(fn, "r")) != NULL) {
l = xs_strip_i(xs_readline(f));
fclose(f);
}
}
break; break;
} }