return -1;
}
+ init_sys();
+
+ ConfigFileEntry.dpath = DPATH;
+ ConfigFileEntry.configfile = CPATH; /* Server configuration file */
+ ConfigFileEntry.klinefile = KPATH; /* Server kline file */
+ ConfigFileEntry.dlinefile = DLPATH; /* dline file */
+ ConfigFileEntry.xlinefile = XPATH;
+ ConfigFileEntry.resvfile = RESVPATH;
+ ConfigFileEntry.connect_timeout = 30; /* Default to 30 */
+
+ umask(077); /* better safe than sorry --SRB */
+
+ 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();
/*
/* Initialise the channel capability usage counts... */
init_chcap_usage_counts();
- ConfigFileEntry.dpath = DPATH;
- ConfigFileEntry.configfile = CPATH; /* Server configuration file */
- ConfigFileEntry.klinefile = KPATH; /* Server kline file */
- ConfigFileEntry.dlinefile = DLPATH; /* dline file */
- 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)
{
printf("ircd: version %s(%s)\n", ircd_version, serno);
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();
}
/* 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);