mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[ADD] No-fly, forms
This commit is contained in:
parent
a880769c48
commit
df394172ec
11 changed files with 338 additions and 52 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue