From 1aad97824ba216be8c21ca5263551767ed5c78b6 Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Tue, 8 Apr 2008 15:50:39 +0400 Subject: [PATCH] Cleaned up ircd.c a bit and added additional check to ircd_die_cb() --- src/ircd.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/ircd.c b/src/ircd.c index 76d7efbb..2a7376e5 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -67,11 +67,6 @@ #include "serno.h" #include "sslproc.h" -extern struct LocalUser meLocalUser; -extern char **myargv; - -int maxconnections; - /* /quote set variables */ struct SetOptions GlobalSetOptions; @@ -80,11 +75,16 @@ struct config_file_entry ConfigFileEntry; /* server info set from ircd.conf */ struct server_info ServerInfo; /* admin info set from ircd.conf */ -struct admin_info AdminInfo; - +struct admin_info AdminInfo; + struct Counter Count; struct ServerStatistics ServerStats; +int maxconnections; +struct Client me; /* That's me */ +struct LocalUser meLocalUser; /* That's also part of me */ + +char **myargv; int ssl_ok = 0; int zlib_ok = 1; @@ -132,9 +132,12 @@ ircd_restart_cb(const char *str) static void ircd_die_cb(const char *str) { - /* Try to get the message out to currently logged in operators. */ - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server panic! %s", str); - inotice("server panic: %s", str); + if(str != NULL) + { + /* Try to get the message out to currently logged in operators. */ + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server panic! %s", str); + inotice("server panic: %s", str); + } unlink(pidFileName); exit(EXIT_FAILURE);