]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/sighandlers.c
Streamline handling of invalid and unset server name
[ngircd-alex.git] / src / ngircd / sighandlers.c
index a953d02b9d92013e99181c2303ca470ccf1869ea..6244846fb4b020275137f3f2189041c16a036c0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2015 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
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <time.h>
 
 #include "conn.h"
-#include "conf-ssl.h"
 #include "channel.h"
 #include "conf.h"
 #include "io.h"
 #include "log.h"
 #include "ngircd.h"
+
 #include "sighandlers.h"
 
 static int signalpipe[2];
@@ -47,7 +48,11 @@ Dump_State(void)
 {
        Log(LOG_DEBUG, "--- Internal server state: %s ---",
            Client_ID(Client_ThisServer()));
-       Log(LOG_DEBUG, "time()=%ld", time(NULL));
+#ifdef HAVE_LONG_LONG
+       Log(LOG_DEBUG, "time()=%llu", (unsigned long long)time(NULL));
+#else
+       Log(LOG_DEBUG, "time()=%lu", (unsigned long)time(NULL));
+#endif
        Conf_DebugDump();
        Conn_DebugDump();
        Client_DebugDump();
@@ -114,7 +119,7 @@ Rehash(void)
        if (strcmp(old_name, Conf_ServerName) != 0 ) {
                strlcpy(Conf_ServerName, old_name, sizeof Conf_ServerName);
                Log(LOG_ERR,
-                   "Can't change \"ServerName\" on runtime! Ignored new name.");
+                   "Can't change server name (\"Name\") on runtime! Ignored new name.");
        }
        if (old_nicklen != Conf_MaxNickLength) {
                Conf_MaxNickLength = old_nicklen;