mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 06:25:04 +00:00
New op #3 to list_maint() (get list name).
This commit is contained in:
parent
82ec4ea95c
commit
3355d5559d
1 changed files with 13 additions and 0 deletions
13
data.c
13
data.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue