X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/02369fa767e87c36fe98d15e1c4aae4172508644..9dd128b4da6e54ca9f97cfcd48e345a57790ffbe:/extensions/m_echotags.c diff --git a/extensions/m_echotags.c b/extensions/m_echotags.c index 49f649c5..bbf78aed 100644 --- a/extensions/m_echotags.c +++ b/extensions/m_echotags.c @@ -4,7 +4,7 @@ #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, @@ -13,28 +13,24 @@ struct Message echotags_msgtab = { mapi_clist_av1 echotags_clist[] = { &echotags_msgtab, NULL }; -static const char echotags_desc = "A test module for tags"; +static const char echotags_desc[] = "A test module for tags"; DECLARE_MODULE_AV2(echotags, NULL, NULL, echotags_clist, NULL, NULL, NULL, NULL, echotags_desc); -static int +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; }