[ADD] No-fly, forms

This commit is contained in:
LDA 2024-07-14 11:42:30 +02:00
commit df394172ec
11 changed files with 338 additions and 52 deletions

View file

@ -9,9 +9,10 @@
#include <XMPPCommand.h>
#include <Parsee.h>
#include <XMPP.h>
#include <XML.h>
void
StatusCallback(XMPPCommandManager *m, char *from, HashMap *form, XMLElement *out)
StatusCallback(XMPPCommandManager *m, char *from, XMLElement *form, XMLElement *out)
{
ParseeData *data = XMPPGetManagerCookie(m);
char *trimmed = ParseeTrimJID(from);
@ -26,12 +27,7 @@ StatusCallback(XMPPCommandManager *m, char *from, HashMap *form, XMLElement *out
if (!ParseeIsAdmin(data, trimmed))
{
XMLElement *note = XMLCreateTag("note");
XMLAddAttr(note, "type", "error");
txt = XMLCreateText("User is not authorised to execute command.");
XMLAddChild(note, txt);
XMLAddChild(out, note);
SetNote("error", "User is not authorised to execute command.");
Free(trimmed);
return;