X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/105a4985b402b3ab294e3bec1fa75bac75430482..67ab06dd8a4c6840fcba129891cd9096543a0478:/modules/m_testmask.c diff --git a/modules/m_testmask.c b/modules/m_testmask.c index c46b0e0e..46b431f8 100644 --- a/modules/m_testmask.c +++ b/modules/m_testmask.c @@ -34,7 +34,6 @@ /* List of ircd includes from ../include/ */ #include "stdinc.h" #include "client.h" -#include "common.h" /* FALSE bleah */ #include "ircd.h" #include "match.h" #include "numeric.h" @@ -46,7 +45,10 @@ #include "parse.h" #include "modules.h" -static int mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, +static const char testmask_desc[] = + "Provides the TESTMASK command to show the number of clients matching a hostmask or GECOS"; + +static void mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); struct Message testmask_msgtab = { @@ -55,12 +57,12 @@ struct Message testmask_msgtab = { }; mapi_clist_av1 testmask_clist[] = { &testmask_msgtab, NULL }; -DECLARE_MODULE_AV2(testmask, NULL, NULL, testmask_clist, NULL, NULL, NULL, NULL, NULL); +DECLARE_MODULE_AV2(testmask, NULL, NULL, testmask_clist, NULL, NULL, NULL, NULL, testmask_desc); static const char *empty_sockhost = "255.255.255.255"; static const char *spoofed_sockhost = "0"; -static int +static void mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { @@ -79,7 +81,7 @@ mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou if((hostname = strchr(name, '@')) == NULL) { sendto_one_notice(source_p, ":Invalid parameters"); - return 0; + return; } *hostname++ = '\0'; @@ -96,7 +98,7 @@ mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou if(EmptyString(username) || EmptyString(hostname)) { sendto_one_notice(source_p, ":Invalid parameters"); - return 0; + return; } if(parc > 2 && !EmptyString(parv[2])) @@ -141,5 +143,4 @@ mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou me.name, source_p->name, lcount, gcount, name ? name : "*", username, hostname, gecos ? gecos : "*"); - return 0; }