From c168ef186411d1fa0228eb46ae3c9dd8e2c22225 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Sun, 6 Mar 2016 17:27:02 -0600 Subject: [PATCH] m_remove: use new AV2 MAPI --- extensions/m_remove.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/extensions/m_remove.c b/extensions/m_remove.c index e7b3715e..35d70edc 100644 --- a/extensions/m_remove.c +++ b/extensions/m_remove.c @@ -55,22 +55,14 @@ mapi_hfn_list_av1 remove_hfnlist[] = { { "privmsg_channel", (hookfn) remove_quote_part }, { NULL, NULL } }; +mapi_cap_list_av2 remove_cap_list[] = { + { MAPI_CAP_SERVER, "REMOVE", NULL, &CAP_REMOVE }, + { 0, NULL, NULL, NULL } +}; -static int -modinit(void) -{ - CAP_REMOVE = capability_put(serv_capindex, "REMOVE", NULL); +const char description[] = "Provides the REMOVE command, an alternative to KICK"; - return 0; -} - -static void -moddeinit(void) -{ - capability_orphan(serv_capindex, "REMOVE"); -} - -DECLARE_MODULE_AV1(remove, modinit, moddeinit, remove_clist, NULL, remove_hfnlist, "$Revision: 3317 $"); +DECLARE_MODULE_AV2(remove, NULL, NULL, remove_clist, NULL, remove_hfnlist, remove_cap_list, NULL, description); static int m_remove(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])