From 9a7b24a6be06371f22fcb06e39604f9efbed7c30 Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Mon, 28 Jul 2008 23:14:51 +0400 Subject: [PATCH] Removed unneeded includes from newconf.h --- include/newconf.h | 6 ------ src/ircd.c | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/include/newconf.h b/include/newconf.h index dfc4623..53d3371 100644 --- a/include/newconf.h +++ b/include/newconf.h @@ -6,12 +6,6 @@ #ifndef _NEWCONF_H_INCLUDED #define _NEWCONF_H_INCLUDED -#include - -#include - -#include "client.h" - struct ConfEntry { const char *cf_name; diff --git a/src/ircd.c b/src/ircd.c index 1a8efa1..cf8bb12 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -541,6 +541,19 @@ main(int argc, char *argv[]) return -1; } + init_sys(); + + + + myargv = argv; + parseargs(&argc, &argv, myopts); + + if(chdir(ConfigFileEntry.dpath)) + { + fprintf(stderr, "Unable to chdir to %s: %s\n", ConfigFileEntry.dpath, strerror(errno)); + exit(EXIT_FAILURE); + } + rb_set_time(); /* @@ -577,10 +590,10 @@ main(int argc, char *argv[]) ConfigFileEntry.xlinefile = XPATH; ConfigFileEntry.resvfile = RESVPATH; ConfigFileEntry.connect_timeout = 30; /* Default to 30 */ - myargv = argv; + umask(077); /* better safe than sorry --SRB */ - parseargs(&argc, &argv, myopts); + if(printVersion) { @@ -588,11 +601,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } - if(chdir(ConfigFileEntry.dpath)) - { - fprintf(stderr, "Unable to chdir to %s: %s\n", ConfigFileEntry.dpath, strerror(errno)); - exit(EXIT_FAILURE); - } + setup_signals(); @@ -620,7 +629,6 @@ main(int argc, char *argv[]) } /* Init the event subsystem */ - init_sys(); rb_lib_init(ircd_log_cb, ircd_restart_cb, ircd_die_cb, !server_state_foreground, maxconnections, DNODE_HEAP_SIZE, FD_HEAP_SIZE); rb_linebuf_init(LINEBUF_HEAP_SIZE);