mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 22:55:11 +00:00
[FIX/WIP] Plumbing, -Werror, death to hitmen
Suspend killers are now no more. Except the actual killers to be gone eventually. Plumbing is also very basic as of now, but it "works".
This commit is contained in:
parent
1f658ece76
commit
bb836789b2
23 changed files with 310 additions and 165 deletions
|
|
@ -24,7 +24,7 @@ extern void ASPing(const ParseeConfig *);
|
|||
|
||||
/* Joins a room from an ID and a given user we want to masquerade
|
||||
* as. */
|
||||
extern void ASJoin(const ParseeConfig *, char *, char *);
|
||||
extern char * ASJoin(const ParseeConfig *, char *, char *);
|
||||
|
||||
/* Bans from a room a specific user */
|
||||
extern void ASBan(const ParseeConfig *, char *, char *);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@
|
|||
); \
|
||||
char *id = GrabString(event, 1, "room_id")
|
||||
|
||||
#define BotRequired(prop) prop = HashMapGet(cmd->arguments, #prop); \
|
||||
if (!prop) \
|
||||
{ \
|
||||
ReplyBasic("Field `" #prop "` REQUIRED."); \
|
||||
}
|
||||
|
||||
#define BotDestroy() Free(profile)
|
||||
|
||||
#define ReplyBasic(rep) do \
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ extern void ParseeRequest(HttpServerContext *, void *);
|
|||
/* A pthread callback used for listening to a component */
|
||||
extern void * ParseeXMPPThread(void *data);
|
||||
|
||||
/* Wakes up the XMPP thread from a "suspend" killer stanza */
|
||||
extern void ParseeWakeupThread(void);
|
||||
/* Wait for a specific stanza with an ID */
|
||||
extern XMLElement * ParseeAwaitStanza(char *identifier);
|
||||
|
||||
/* Finds the room a DM is associated to, from a Matrix user and a Jabber
|
||||
* ID. */
|
||||
|
|
@ -204,7 +204,7 @@ extern void ParseeDestroyJIDTable(void);
|
|||
|
||||
/* Globally bans a Matrix user from ever interacting with Parsee, and bans
|
||||
* them from bridged rooms where the bot has administrator. */
|
||||
extern void ParseeGlobalBan(ParseeData *, char *user);
|
||||
extern void ParseeGlobalBan(ParseeData *, char *user, char *reason);
|
||||
|
||||
/* Verifies if a user was globally banned. If so, then apply actions to the
|
||||
* room ID */
|
||||
|
|
|
|||
|
|
@ -40,6 +40,12 @@ typedef struct ParseeCmdArg {
|
|||
"Sets the power level to send a specific event " \
|
||||
"in a Parsee room" \
|
||||
) \
|
||||
X_COMMAND( \
|
||||
"plumb-muc", CmdPlumb, \
|
||||
"Plumbs an existing Matrix room to a MUC." \
|
||||
"You'll need to give the Parsee bot enough " \
|
||||
"privileges, however. " \
|
||||
) \
|
||||
X_COMMAND( \
|
||||
"help", CmdHelp, \
|
||||
"Shows the command list" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue