]> jfr.im git - solanum.git/blobdiff - modules/m_svinfo.c
reference.conf: add drain_reason
[solanum.git] / modules / m_svinfo.c
index 05770ada08446966cdf78d83309a1b18873f1c2c..6aaf9b16f1ab45c3571626532a4afe428438dfef 100644 (file)
@@ -23,7 +23,6 @@
  */
 #include "stdinc.h"
 #include "client.h"
-#include "common.h"            /* TRUE bleah */
 #include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "parse.h"
 #include "modules.h"
 
-static int ms_svinfo(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 static const char svinfo_desc[] =
        "Provides TS6 SVINFO command to ensure version and clock synchronisation";
 
+static void ms_svinfo(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 struct Message svinfo_msgtab = {
        "SVINFO", 0, 0, 0, 0,
        {mg_unreg, mg_ignore, mg_ignore, {ms_svinfo, 5}, mg_ignore, mg_ignore}
@@ -54,7 +53,7 @@ DECLARE_MODULE_AV2(svinfo, NULL, NULL, svinfo_clist, NULL, NULL, NULL, NULL, svi
  *      parv[3] = unused, send 0
  *      parv[4] = server's idea of UTC time
  */
-static int
+static void
 ms_svinfo(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        signed long deltat;
@@ -63,18 +62,18 @@ ms_svinfo(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
 
        /* SVINFO isnt remote. */
        if(source_p != client_p)
-               return 0;
+               return;
 
        if(TS_CURRENT < atoi(parv[2]) || atoi(parv[1]) < TS_MIN)
        {
                /* TS version is too low on one of the sides, drop the link */
-               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                     "Link %s dropped, wrong TS protocol version (%s,%s)",
                                     source_p->name, parv[1], parv[2]);
                snprintf(squitreason, sizeof squitreason, "Incompatible TS version (%s,%s)",
                                parv[1], parv[2]);
                exit_client(source_p, source_p, source_p, squitreason);
-               return 0;
+               return;
        }
 
        /*
@@ -86,7 +85,7 @@ ms_svinfo(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
 
        if(deltat > ConfigFileEntry.ts_max_delta)
        {
-               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                     "Link %s dropped, excessive TS delta"
                                     " (my TS=%ld, their TS=%ld, delta=%ld)",
                                     source_p->name,
@@ -99,7 +98,7 @@ ms_svinfo(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
                                (long) rb_current_time(), (long) theirtime, deltat);
                disable_server_conf_autoconn(source_p->name);
                exit_client(source_p, source_p, source_p, squitreason);
-               return 0;
+               return;
        }
 
        if(deltat > ConfigFileEntry.ts_warn_delta)
@@ -109,6 +108,4 @@ ms_svinfo(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sourc
                                     " (my TS=%ld, their TS=%ld, delta=%ld)",
                                     source_p->name, (long) rb_current_time(), (long) theirtime, deltat);
        }
-
-       return 0;
 }