]> jfr.im git - solanum.git/blobdiff - modules/m_testmask.c
reference.conf: add drain_reason
[solanum.git] / modules / m_testmask.c
index ea8770c821cd2f061230afcdfe5e05157aa0218b..46b431f87ce0e57165fc7883ddcb99ae1deddeff 100644 (file)
@@ -34,7 +34,6 @@
 /* List of ircd includes from ../include/ */
 #include "stdinc.h"
 #include "client.h"
-#include "common.h"
 #include "ircd.h"
 #include "match.h"
 #include "numeric.h"
 #include "parse.h"
 #include "modules.h"
 
-static void mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
-                       int parc, const char *parv[]);
 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 = {
        "TESTMASK", 0, 0, 0, 0,
        {mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_testmask, 2}}
@@ -62,7 +62,7 @@ DECLARE_MODULE_AV2(testmask, NULL, NULL, testmask_clist, NULL, NULL, NULL, NULL,
 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[])
 {
@@ -81,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';
@@ -98,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]))
@@ -143,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;
 }