Cleaned up ircd.c a bit and added additional check to ircd_die_cb()
This commit is contained in:
parent
72324d1052
commit
1aad97824b
1 changed files with 13 additions and 10 deletions
23
src/ircd.c
23
src/ircd.c
|
@ -67,11 +67,6 @@
|
||||||
#include "serno.h"
|
#include "serno.h"
|
||||||
#include "sslproc.h"
|
#include "sslproc.h"
|
||||||
|
|
||||||
extern struct LocalUser meLocalUser;
|
|
||||||
extern char **myargv;
|
|
||||||
|
|
||||||
int maxconnections;
|
|
||||||
|
|
||||||
/* /quote set variables */
|
/* /quote set variables */
|
||||||
struct SetOptions GlobalSetOptions;
|
struct SetOptions GlobalSetOptions;
|
||||||
|
|
||||||
|
@ -80,11 +75,16 @@ struct config_file_entry ConfigFileEntry;
|
||||||
/* server info set from ircd.conf */
|
/* server info set from ircd.conf */
|
||||||
struct server_info ServerInfo;
|
struct server_info ServerInfo;
|
||||||
/* admin info set from ircd.conf */
|
/* admin info set from ircd.conf */
|
||||||
struct admin_info AdminInfo;
|
struct admin_info AdminInfo;
|
||||||
|
|
||||||
struct Counter Count;
|
struct Counter Count;
|
||||||
struct ServerStatistics ServerStats;
|
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 ssl_ok = 0;
|
||||||
int zlib_ok = 1;
|
int zlib_ok = 1;
|
||||||
|
|
||||||
|
@ -132,9 +132,12 @@ ircd_restart_cb(const char *str)
|
||||||
static void
|
static void
|
||||||
ircd_die_cb(const char *str)
|
ircd_die_cb(const char *str)
|
||||||
{
|
{
|
||||||
/* Try to get the message out to currently logged in operators. */
|
if(str != NULL)
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server panic! %s", str);
|
{
|
||||||
inotice("server panic: %s", 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);
|
||||||
|
}
|
||||||
|
|
||||||
unlink(pidFileName);
|
unlink(pidFileName);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
Loading…
Reference in a new issue