mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 07:50:57 +01:00
m_remove: use new AV2 MAPI
This commit is contained in:
parent
2ab24be6f9
commit
c168ef1864
1 changed files with 6 additions and 14 deletions
|
@ -55,22 +55,14 @@ mapi_hfn_list_av1 remove_hfnlist[] = {
|
||||||
{ "privmsg_channel", (hookfn) remove_quote_part },
|
{ "privmsg_channel", (hookfn) remove_quote_part },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
mapi_cap_list_av2 remove_cap_list[] = {
|
||||||
|
{ MAPI_CAP_SERVER, "REMOVE", NULL, &CAP_REMOVE },
|
||||||
|
{ 0, NULL, NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
static int
|
const char description[] = "Provides the REMOVE command, an alternative to KICK";
|
||||||
modinit(void)
|
|
||||||
{
|
|
||||||
CAP_REMOVE = capability_put(serv_capindex, "REMOVE", NULL);
|
|
||||||
|
|
||||||
return 0;
|
DECLARE_MODULE_AV2(remove, NULL, NULL, remove_clist, NULL, remove_hfnlist, remove_cap_list, NULL, description);
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
moddeinit(void)
|
|
||||||
{
|
|
||||||
capability_orphan(serv_capindex, "REMOVE");
|
|
||||||
}
|
|
||||||
|
|
||||||
DECLARE_MODULE_AV1(remove, modinit, moddeinit, remove_clist, NULL, remove_hfnlist, "$Revision: 3317 $");
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
m_remove(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
m_remove(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||||
|
|
Loading…
Reference in a new issue