| 1 |
|
/* |
| 2 |
< |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
| 3 |
< |
* ircd.c: Starts up and runs the ircd. |
| 2 |
> |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
|
* |
| 4 |
< |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
| 4 |
> |
* Copyright (c) 1997-2014 ircd-hybrid development team |
| 5 |
|
* |
| 6 |
|
* This program is free software; you can redistribute it and/or modify |
| 7 |
|
* it under the terms of the GNU General Public License as published by |
| 17 |
|
* along with this program; if not, write to the Free Software |
| 18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 19 |
|
* USA |
| 20 |
< |
* |
| 21 |
< |
* $Id$ |
| 20 |
> |
*/ |
| 21 |
> |
|
| 22 |
> |
/*! \file ircd.c |
| 23 |
> |
* \brief Starts up and runs the ircd. |
| 24 |
> |
* \version $Id$ |
| 25 |
|
*/ |
| 26 |
|
|
| 27 |
|
#include "stdinc.h" |
| 141 |
|
static int printVersion = 0; |
| 142 |
|
|
| 143 |
|
static struct lgetopt myopts[] = { |
| 144 |
< |
{"configfile", &ConfigFileEntry.configfile, |
| 144 |
> |
{"configfile", &ConfigFileEntry.configfile, |
| 145 |
|
STRING, "File to use for ircd.conf"}, |
| 146 |
|
{"glinefile", &ConfigFileEntry.glinefile, |
| 147 |
|
STRING, "File to use for gline database"}, |
| 148 |
< |
{"klinefile", &ConfigFileEntry.klinefile, |
| 148 |
> |
{"klinefile", &ConfigFileEntry.klinefile, |
| 149 |
|
STRING, "File to use for kline database"}, |
| 150 |
|
{"dlinefile", &ConfigFileEntry.dlinefile, |
| 151 |
|
STRING, "File to use for dline database"}, |
| 152 |
< |
{"xlinefile", &ConfigFileEntry.xlinefile, |
| 152 |
> |
{"xlinefile", &ConfigFileEntry.xlinefile, |
| 153 |
|
STRING, "File to use for xline database"}, |
| 154 |
|
{"resvfile", &ConfigFileEntry.resvfile, |
| 155 |
|
STRING, "File to use for resv database"}, |
| 156 |
< |
{"logfile", &logFileName, |
| 156 |
> |
{"logfile", &logFileName, |
| 157 |
|
STRING, "File to use for ircd.log"}, |
| 158 |
|
{"pidfile", &pidFileName, |
| 159 |
|
STRING, "File to use for process ID"}, |
| 160 |
< |
{"foreground", &server_state.foreground, |
| 160 |
> |
{"foreground", &server_state.foreground, |
| 161 |
|
YESNO, "Run in foreground (don't detach)"}, |
| 162 |
< |
{"version", &printVersion, |
| 162 |
> |
{"version", &printVersion, |
| 163 |
|
YESNO, "Print version and exit"}, |
| 164 |
|
{"help", NULL, USAGE, "Print this text"}, |
| 165 |
|
{NULL, NULL, STRING, NULL}, |
| 203 |
|
{ |
| 204 |
|
/* |
| 205 |
|
* Maybe we want a flags word? |
| 206 |
< |
* ie. if (REHASHED_KLINES(global_flags)) |
| 206 |
> |
* ie. if (REHASHED_KLINES(global_flags)) |
| 207 |
|
* SET_REHASHED_KLINES(global_flags) |
| 208 |
|
* CLEAR_REHASHED_KLINES(global_flags) |
| 209 |
|
* |
| 256 |
|
* |
| 257 |
|
* inputs - none |
| 258 |
|
* output - none |
| 259 |
< |
* side effects - This sets all global set options needed |
| 259 |
> |
* side effects - This sets all global set options needed |
| 260 |
|
*/ |
| 261 |
|
static void |
| 262 |
|
initialize_global_set_options(void) |
| 594 |
|
|
| 595 |
|
hash_add_id(&me); |
| 596 |
|
hash_add_client(&me); |
| 597 |
< |
|
| 597 |
> |
|
| 598 |
|
/* add ourselves to global_serv_list */ |
| 599 |
|
dlinkAdd(&me, make_dlink_node(), &global_serv_list); |
| 600 |
|
|