]> jfr.im git - solanum.git/blobdiff - extensions/m_echotags.c
Merge pull request #302 from edk0/sasl-usercloak
[solanum.git] / extensions / m_echotags.c
index dd363d43feec3d381fc1a70b215145e718ffaa8d..bbf78aed1650f51a906953914a264ee6487b074f 100644 (file)
@@ -4,35 +4,33 @@
 #include "ircd.h"
 #include "send.h"
 
-static int m_echotags(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static void m_echotags(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
 struct Message echotags_msgtab = {
-  "ECHOTAGS", 0, 0, 0, 0,
-  { mg_ignore, {m_echotags, 0}, mg_ignore, mg_ignore, mg_ignore, {m_echotags, 0} }
+       "ECHOTAGS", 0, 0, 0, 0,
+       { mg_ignore, {m_echotags, 0}, mg_ignore, mg_ignore, mg_ignore, {m_echotags, 0} }
 };
 
 mapi_clist_av1 echotags_clist[] = { &echotags_msgtab, NULL };
 
-DECLARE_MODULE_AV1(echotags, NULL, NULL, echotags_clist, NULL, NULL, "$Id$");
+static const char echotags_desc[] = "A test module for tags";
 
-static int
+DECLARE_MODULE_AV2(echotags, NULL, NULL, echotags_clist, NULL, NULL, NULL, NULL, echotags_desc);
+
+static void
 m_echotags(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
-       int i;
-
        sendto_one_notice(source_p, ":*** You sent %zu tags.", msgbuf_p->n_tags);
 
-       for (i = 0; i < msgbuf_p->n_tags; i++)
+       for (size_t i = 0; i < msgbuf_p->n_tags; i++)
        {
                struct MsgTag *tag = &msgbuf_p->tags[i];
 
                if (tag->value)
-                       sendto_one_notice(source_p, ":*** %d: %s => %s", i, tag->key, tag->value);
+                       sendto_one_notice(source_p, ":*** %zu: %s => %s", i, tag->key, tag->value);
                else
-                       sendto_one_notice(source_p, ":*** %d: %s", i, tag->key);
+                       sendto_one_notice(source_p, ":*** %zu: %s", i, tag->key);
        }
-
-       return 0;
 }