mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Fixed bug in drop_dm_from_unknown web processing.
This commit is contained in:
parent
b3f2d15d00
commit
ef59df5db2
1 changed files with 6 additions and 4 deletions
10
html.c
10
html.c
|
@ -1802,6 +1802,8 @@ int html_post_handler(const xs_dict *req, const char *q_path,
|
|||
/* change of user data */
|
||||
char *v;
|
||||
char *p1, *p2;
|
||||
xs *byes = xs_val_new(XSTYPE_TRUE);
|
||||
xs *bno = xs_val_new(XSTYPE_FALSE);
|
||||
|
||||
if ((v = xs_dict_get(p_vars, "name")) != NULL)
|
||||
snac.config = xs_dict_set(snac.config, "name", v);
|
||||
|
@ -1825,10 +1827,10 @@ int html_post_handler(const xs_dict *req, const char *q_path,
|
|||
xs *days = xs_number_new(atof(v));
|
||||
snac.config = xs_dict_set(snac.config, "purge_days", days);
|
||||
}
|
||||
if ((v = xs_dict_get(p_vars, "drop_dm_from_unknown")) != NULL) {
|
||||
xs *yn = xs_val_new(v && strcmp(v, "on") == 0 ? XSTYPE_TRUE : XSTYPE_FALSE);
|
||||
snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", yn);
|
||||
}
|
||||
if ((v = xs_dict_get(p_vars, "drop_dm_from_unknown")) != NULL && strcmp(v, "on") == 0)
|
||||
snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", byes);
|
||||
else
|
||||
snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", bno);
|
||||
|
||||
/* avatar upload */
|
||||
xs_list *avatar_file = xs_dict_get(p_vars, "avatar_file");
|
||||
|
|
Loading…
Reference in a new issue