]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/conn.c
Unbreak GCC 10 (-fno-common) build
[ngircd.git] / src / ngircd / conn.c
index e211d1841cc1167719bbd19dcc936d9d091f7ffb..e14e6c08037aa53e57fd40825bba446313ef1b68 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2019 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -10,6 +10,7 @@
  */
 
 #define CONN_MODULE
+#define CONN_MODULE_GLOBAL_INIT
 
 #include "portab.h"
 
@@ -660,6 +661,9 @@ Conn_Handler(void)
        struct timeval tv;
        time_t t;
 
+       Log(LOG_NOTICE, "Server \"%s\" (on \"%s\") ready.",
+           Client_ID(Client_ThisServer()), Client_Hostname(Client_ThisServer()));
+
        while (!NGIRCd_SignalQuit && !NGIRCd_SignalRestart) {
                t = time(NULL);
 
@@ -1081,9 +1085,9 @@ Conn_Close(CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClien
                 * the calculation of in_p and out_p: in_z_k and out_z_k
                 * are non-zero, that's guaranteed by the protocol until
                 * compression can be enabled. */
-               if (! in_z_k)
+               if (in_z_k <= 0)
                        in_z_k = in_k;
-               if (! out_z_k)
+               if (out_z_k <= 0)
                        out_z_k = out_k;
                in_p = (int)(( in_k * 100 ) / in_z_k );
                out_p = (int)(( out_k * 100 ) / out_z_k );