]> jfr.im git - solanum.git/blobdiff - extensions/m_identify.c
Merge pull request #288 from edk0/umode-o-split
[solanum.git] / extensions / m_identify.c
index 9f2cb5ffc8741d577cc1e6a10276dccc77ab70d0..aebcd361668c479f8213e6efd1b018b9c704b8a0 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "stdinc.h"
 #include "client.h"
-#include "common.h"
 #include "ircd.h"
 #include "match.h"
 #include "numeric.h"
@@ -47,7 +46,9 @@
 #define SVS_chanserv_NICK "ChanServ"
 #define SVS_nickserv_NICK "NickServ"
 
-static int m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static const char identify_desc[] = "Adds the IDENTIFY alias that forwards to NickServ or ChanServ";
+
+static void m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
 struct Message identify_msgtab = {
        "IDENTIFY", 0, 0, 0, 0,
@@ -59,9 +60,10 @@ mapi_clist_av1 identify_clist[] = {
        NULL
 };
 
-DECLARE_MODULE_AV2(identify, NULL, NULL, identify_clist, NULL, NULL, NULL, NULL, NULL);
+DECLARE_MODULE_AV2(identify, NULL, NULL, identify_clist, NULL, NULL, NULL, NULL, identify_desc);
 
-static int m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+static void
+m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        const char *nick;
        struct Client *target_p;
@@ -69,7 +71,7 @@ static int m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct C
        if (parc < 2 || EmptyString(parv[1]))
        {
                sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name, source_p->name);
-               return 0;
+               return;
        }
 
        nick = parv[1][0] == '#' ? SVS_chanserv_NICK : SVS_nickserv_NICK;
@@ -81,5 +83,4 @@ static int m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct C
        {
                sendto_one_numeric(source_p, ERR_SERVICESDOWN, form_str(ERR_SERVICESDOWN), nick);
        }
-       return 0;
 }