mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-14 00:25:11 +00:00
[ADD/WIP/AYA] Sending errors, voice reqs, Ayawork.
Ayaya!
This commit is contained in:
parent
aa71c5cfeb
commit
8588a6fb5c
7 changed files with 197 additions and 5 deletions
|
|
@ -79,6 +79,7 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
char *decode_from, *real_matrix;
|
||||
char *matrix_user_pl = ParseeEncodeJID(args->config, trim, false);
|
||||
char *affiliation = HashMapGet(item->attrs, "affiliation");
|
||||
char *role = HashMapGet(item->attrs, "role");
|
||||
int power_level = 0;
|
||||
char *parsee = ParseeMXID(args);
|
||||
|
||||
|
|
@ -117,6 +118,24 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
power_level = -1;
|
||||
}
|
||||
|
||||
if (StrEquals(role, "visitor"))
|
||||
{
|
||||
char *parsee = ParseeJID(args);
|
||||
if (!StrEquals(HashMapGet(stanza->attrs, "to"), parsee) &&
|
||||
IsStatus(110))
|
||||
{
|
||||
char *muc = ParseeTrimJID(HashMapGet(stanza->attrs, "from"));
|
||||
char *usr = HashMapGet(stanza->attrs, "to");
|
||||
|
||||
/* Ask for voice */
|
||||
XMPPRequestVoice(args->jabber, usr, muc);
|
||||
|
||||
Free(muc);
|
||||
}
|
||||
|
||||
Free(parsee);
|
||||
}
|
||||
|
||||
/* Set the user's PL
|
||||
* TODO: Do NOT change the PL of *real* people nilly-willy.
|
||||
* In some scenarios, this is really bad behaviour. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue