mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:55:10 +00:00
[ADD/WIP] Start unifying DMs and MUCs
I really need to dispatch XMPP stanza management.
This commit is contained in:
parent
6b0f08c49e
commit
5f2c3a9cb8
10 changed files with 570 additions and 87 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <AS.h>
|
||||
|
||||
#include <Cytoplasm/Log.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
CommandHead(CmdSetPL, cmd, argp)
|
||||
|
|
@ -26,3 +27,25 @@ CommandHead(CmdSetPL, cmd, argp)
|
|||
));
|
||||
ASSetPL(data->config, room, map);
|
||||
}
|
||||
CommandHead(CmdSetMin, cmd, argp)
|
||||
{
|
||||
ParseeCmdArg *args = argp;
|
||||
ParseeData *data = args->data;
|
||||
char *event = HashMapGet(cmd->arguments, "event");
|
||||
char *room = HashMapGet(cmd->arguments, "room");
|
||||
char *pl_str = HashMapGet(cmd->arguments, "pl");
|
||||
long pl = strtol(pl_str, NULL, 10);
|
||||
HashMap *map;
|
||||
|
||||
|
||||
if (!event || !pl_str)
|
||||
{
|
||||
return;
|
||||
}
|
||||
map = ASGetPL(data->config, room);
|
||||
JsonValueFree(JsonSet(
|
||||
map, JsonValueInteger(pl),
|
||||
2, "events", event
|
||||
));
|
||||
ASSetPL(data->config, room, map);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue