]> jfr.im git - solanum.git/blobdiff - modules/m_knock.c
msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag.
[solanum.git] / modules / m_knock.c
index 5e21a51e9f293c942118cecf7653b2c33569b4b8..86d325158a86f415f4a09d9809612f922364024c 100644 (file)
 #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
@@ -61,7 +75,7 @@ DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 3570
  *  <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;