X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/55abcbb20aeabcf2e878a9c65c9697210dd10079..1c78029cd4a17c75b0cf8197736493860c46bfd1:/modules/m_testmask.c diff --git a/modules/m_testmask.c b/modules/m_testmask.c index 68313b2d..46b431f8 100644 --- a/modules/m_testmask.c +++ b/modules/m_testmask.c @@ -29,14 +29,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: m_testmask.c 3161 2007-01-25 07:23:01Z nenolod $ - * */ /* 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" @@ -48,22 +45,25 @@ #include "parse.h" #include "modules.h" -static int mo_testmask(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 = { - "TESTMASK", 0, 0, 0, MFLG_SLOW, + "TESTMASK", 0, 0, 0, 0, {mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_testmask, 2}} }; mapi_clist_av1 testmask_clist[] = { &testmask_msgtab, NULL }; -DECLARE_MODULE_AV1(testmask, NULL, NULL, testmask_clist, NULL, NULL, "$Revision: 3161 $"); +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 -mo_testmask(struct Client *client_p, struct Client *source_p, +static void +mo_testmask(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { struct Client *target_p; @@ -81,7 +81,7 @@ mo_testmask(struct Client *client_p, struct Client *source_p, if((hostname = strchr(name, '@')) == NULL) { sendto_one_notice(source_p, ":Invalid parameters"); - return 0; + return; } *hostname++ = '\0'; @@ -98,7 +98,7 @@ mo_testmask(struct Client *client_p, struct Client *source_p, 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 Client *client_p, struct Client *source_p, me.name, source_p->name, lcount, gcount, name ? name : "*", username, hostname, gecos ? gecos : "*"); - return 0; }