mirror of
https://github.com/matrix-construct/construct
synced 2024-11-20 08:51:18 +01:00
m_invite: update for AV2
This commit is contained in:
parent
9fd8e7cbc9
commit
df1f1212a8
1 changed files with 7 additions and 13 deletions
|
@ -41,27 +41,21 @@
|
||||||
|
|
||||||
static int m_invite(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
|
static int m_invite(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
|
||||||
static unsigned int CAP_INVITE_NOTIFY = 0;
|
static unsigned int CAP_INVITE_NOTIFY = 0;
|
||||||
|
static const char invite_desc[] = "Provides facilities for invite and related notifications";
|
||||||
|
|
||||||
struct Message invite_msgtab = {
|
struct Message invite_msgtab = {
|
||||||
"INVITE", 0, 0, 0, 0,
|
"INVITE", 0, 0, 0, 0,
|
||||||
{mg_unreg, {m_invite, 3}, {m_invite, 3}, mg_ignore, mg_ignore, {m_invite, 3}}
|
{mg_unreg, {m_invite, 3}, {m_invite, 3}, mg_ignore, mg_ignore, {m_invite, 3}}
|
||||||
};
|
};
|
||||||
|
|
||||||
mapi_clist_av1 invite_clist[] = { &invite_msgtab, NULL };
|
mapi_clist_av1 invite_clist[] = { &invite_msgtab, NULL };
|
||||||
|
|
||||||
static int
|
mapi_cap_list_av2 invite_cap_list[] = {
|
||||||
invite_modinit(void)
|
{ MAPI_CAP_CLIENT, "invite-notify", NULL, &CAP_INVITE_NOTIFY },
|
||||||
{
|
{ 0, NULL, NULL, NULL }
|
||||||
CAP_INVITE_NOTIFY = capability_put(cli_capindex, "invite-notify", NULL);
|
};
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
DECLARE_MODULE_AV2(invite, NULL, NULL, invite_clist, NULL, NULL, invite_cap_list, NULL, invite_desc);
|
||||||
invite_moddeinit(void)
|
|
||||||
{
|
|
||||||
capability_orphan(cli_capindex, "invite-notify");
|
|
||||||
}
|
|
||||||
|
|
||||||
DECLARE_MODULE_AV2(invite, invite_modinit, invite_moddeinit, invite_clist, NULL, NULL, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
static void add_invite(struct Channel *, struct Client *);
|
static void add_invite(struct Channel *, struct Client *);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue