[MOD/WIP] Continue XEP-0421

This commit is contained in:
LDA 2024-07-19 17:07:13 +02:00
commit c9f8d69802
8 changed files with 120 additions and 66 deletions

View file

@ -43,12 +43,19 @@ NoflyCallback(XMPPCommandManager *m, char *from, XMLElement *form, XMLElement *o
XMLAddAttr(x, "type", "result");
{
DbRef *ref = DbLock(data->db, 1, "global_bans");
HashMap *bans = DbJson(ref);
HashMap *bans;
char *banned, *reason;
JsonValue *ban_val;
reported = XMLCreateTag("reported");
XMLAddChild(x, reported);
if (!ref)
{
ref = DbCreate(data->db, 1, "global_bans");
}
bans = DbJson(ref);
/* Report */
Report("ban", "Banned glob");
Report("reason", "Reason for the nofly");