#include "parse.h"
#include "modules.h"
#include "s_serv.h"
+#include "supported.h"
-static int m_knock(struct Client *, struct Client *, int, const char **);
+static int m_knock(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message knock_msgtab = {
- "KNOCK", 0, 0, 0, MFLG_SLOW,
+ "KNOCK", 0, 0, 0, 0,
{mg_unreg, {m_knock, 2}, {m_knock, 2}, mg_ignore, mg_ignore, {m_knock, 2}}
};
+static int
+_modinit(void)
+{
+ add_isupport("KNOCK", isupport_boolean, &ConfigChannel.use_knock);
+ return 0;
+}
+
+static void
+_moddeinit(void)
+{
+ delete_isupport("KNOCK");
+}
+
mapi_clist_av1 knock_clist[] = { &knock_msgtab, NULL };
-DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 3570 $");
+DECLARE_MODULE_AV1(knock, _modinit, _moddeinit, knock_clist, NULL, NULL, "$Revision: 3570 $");
/* m_knock
* parv[1] = channel
* <anonymous>
*/
static int
-m_knock(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_knock(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Channel *chptr;
char *p, *name;