]> jfr.im git - irc/rqf/shadowircd.git/blame - src/ircd_state.c
s_log.* -> logger.* (s_foo looks ugly, lets try to get rid of it)
[irc/rqf/shadowircd.git] / src / ircd_state.c
CommitLineData
212380e3 1/*
2 * charybdis: An advanced ircd.
3 * ircd_state.c: Functions for backing up and synchronizing IRCd's state
4 *
5 * Copyright (c) 2006 William Pitcock <nenolod@nenolod.net>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
9 * met:
10 *
11 * 1. Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * 3. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $Id: main.c 867 2006-02-16 14:25:09Z nenolod $
34 */
35
36#include "stdinc.h"
37#include "setup.h"
38#include "config.h"
39
40#include "client.h"
212380e3 41#include "ircd.h"
42#include "channel.h"
43#include "class.h"
44#include "client.h"
45#include "common.h"
212380e3 46#include "hash.h"
47#include "irc_string.h"
48#include "ircd_signal.h"
49#include "sprintf_irc.h"
50#include "s_gline.h"
51#include "msg.h" /* msgtab */
52#include "hostmask.h"
53#include "numeric.h"
54#include "parse.h"
55#include "res.h"
56#include "restart.h"
57#include "s_auth.h"
212380e3 58#include "s_conf.h"
d3455e2c 59#include "logger.h"
212380e3 60#include "s_serv.h" /* try_connections */
61#include "s_user.h"
62#include "s_stats.h"
63#include "scache.h"
64#include "send.h"
65#include "whowas.h"
66#include "modules.h"
212380e3 67#include "hook.h"
68#include "ircd_getopt.h"
212380e3 69#include "newconf.h"
212380e3 70#include "reject.h"
71#include "s_conf.h"
72#include "s_newconf.h"
73#include "cache.h"
74#include "monitor.h"
212380e3 75#include "patchlevel.h"
76#include "serno.h"
77
af81d5a0
WP
78rb_dlink_list lclient_list = { NULL, NULL, 0 };
79rb_dlink_list global_client_list = { NULL, NULL, 0 };
80rb_dlink_list global_channel_list = { NULL, NULL, 0 };
212380e3 81
af81d5a0
WP
82rb_dlink_list unknown_list; /* unknown clients ON this server only */
83rb_dlink_list serv_list; /* local servers to this server ONLY */
84rb_dlink_list global_serv_list; /* global servers on the network */
85rb_dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
86rb_dlink_list oper_list; /* network opers */
212380e3 87
88/* /quote set variables */
89struct SetOptions GlobalSetOptions;
90
91/* configuration set from ircd.conf */
92struct config_file_entry ConfigFileEntry;
93/* server info set from ircd.conf */
94struct server_info ServerInfo;
95/* admin info set from ircd.conf */
96struct admin_info AdminInfo;
97
98struct Counter Count;
99
100struct timeval SystemTime;
101int ServerRunning; /* GLOBAL - server execution state */
102struct Client me; /* That's me */
103struct LocalUser meLocalUser; /* That's also part of me */
104
105time_t startup_time;
106
107int default_server_capabs = CAP_MASK;
108
109int splitmode;
110int splitchecking;
111int split_users;
112int split_servers;
113int eob_count;
114
115unsigned long initialVMTop = 0; /* top of virtual memory at init */
116const char *logFileName = LPATH;
117const char *pidFileName = PPATH;
118
119char **myargv;
120int dorehash = 0;
121int dorehashbans = 0;
122int doremotd = 0;
123int kline_queued = 0;
124int server_state_foreground = 0;
125int opers_see_all_users = 0;
126
127int testing_conf = 0;
128
129struct config_channel_entry ConfigChannel;
6e9b4415
VY
130rb_bh *channel_heap;
131rb_bh *ban_heap;
132rb_bh *topic_heap;
133rb_bh *member_heap;
212380e3 134
6e9b4415
VY
135rb_bh *client_heap = NULL;
136rb_bh *lclient_heap = NULL;
137rb_bh *pclient_heap = NULL;
212380e3 138
139char current_uid[IDLEN];
140
141/* patricia */
6e9b4415
VY
142rb_bh *prefix_heap;
143rb_bh *node_heap;
144rb_bh *patricia_heap;
212380e3 145
6e9b4415 146rb_bh *linebuf_heap;
212380e3 147
6e9b4415 148rb_bh *dnode_heap;
212380e3 149
150#ifdef NOTYET
151
152void charybdis_initstate(struct IRCdState *self)
153{
154
155}
156
157#endif