]> jfr.im git - solanum.git/blobdiff - modules/core/m_squit.c
Merge pull request #335 from edk0/post-registration-delay
[solanum.git] / modules / core / m_squit.c
index f5f1b295b8b575c67dde12bfb805c2847398d456..ad2dc96528201300562147c4fb14217464dc3e54 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "stdinc.h"
 #include "client.h"
-#include "common.h"            /* FALSE bleah */
 #include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "hash.h"
 #include "s_newconf.h"
 
-static int ms_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
-static int mo_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 static const char squit_desc[] = "Provides the SQUIT command to cause a server to quit";
 
+static void ms_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static void mo_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+
 struct Message squit_msgtab = {
        "SQUIT", 0, 0, 0, 0,
        {mg_unreg, mg_not_oper, {ms_squit, 0}, {ms_squit, 0}, mg_ignore, {mo_squit, 2}}
@@ -66,7 +66,7 @@ static struct squit_parms *find_squit(struct Client *client_p,
  *      parv[1] = server name
  *      parv[2] = comment
  */
-static int
+static void
 mo_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        struct squit_parms *found_squit;
@@ -88,18 +88,16 @@ mo_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
                {
                        sendto_one(source_p, form_str(ERR_NOPRIVS),
                                   me.name, source_p->name, "remote");
-                       return 0;
+                       return;
                }
 
                exit_client(client_p, found_squit->target_p, source_p, comment);
-               return 0;
+               return;
        }
        else
        {
                sendto_one_numeric(source_p, ERR_NOSUCHSERVER, form_str(ERR_NOSUCHSERVER), parv[1]);
        }
-
-       return 0;
 }
 
 /*
@@ -107,7 +105,7 @@ mo_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
  *      parv[1] = server name
  *      parv[2] = comment
  */
-static int
+static void
 ms_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        struct Client *target_p;
@@ -118,12 +116,12 @@ ms_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
        else
        {
                if((target_p = find_server(NULL, parv[1])) == NULL)
-                       return 0;
+                       return;
 
                if(IsMe(target_p))
                        target_p = client_p;
                if(!IsServer(target_p))
-                       return 0;
+                       return;
        }
 
        /* Server is closing its link */
@@ -148,7 +146,6 @@ ms_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
                ilog(L_SERVER, "SQUIT From %s : %s (%s)", source_p->name, target_p->name, comment);
        }
        exit_client(client_p, target_p, source_p, comment);
-       return 0;
 }