]> jfr.im git - solanum.git/blob - include/ircd.h
Clean up duplication in ChannelModeFunc prototypes (#52)
[solanum.git] / include / ircd.h
1 /*
2 * ircd-ratbox: A slightly useful ircd.
3 * ircd.h: A header for the ircd startup routines.
4 *
5 * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
6 * Copyright (C) 1996-2002 Hybrid Development Team
7 * Copyright (C) 2002-2004 ircd-ratbox development team
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 */
24
25 #ifndef INCLUDED_ircd_h
26 #define INCLUDED_ircd_h
27
28 #include "defaults.h"
29
30 struct Client;
31 struct rb_dlink_list;
32
33 struct SetOptions
34 {
35 int maxclients; /* max clients allowed */
36 int autoconn; /* autoconn enabled for all servers? */
37
38 int floodcount; /* Number of messages in 1 second */
39 int ident_timeout; /* timeout for identd lookups */
40
41 int spam_num;
42 int spam_time;
43
44 char operstring[REALLEN];
45 char adminstring[REALLEN];
46 };
47
48 struct Counter
49 {
50 int oper; /* Opers */
51 int total; /* total clients */
52 int invisi; /* invisible clients */
53 int max_loc; /* MAX local clients */
54 int max_tot; /* MAX global clients */
55 unsigned long totalrestartcount; /* Total client count ever */
56 };
57
58 extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */
59
60 extern const char *creation;
61 extern const char *generation;
62 extern const char *infotext[];
63 extern const char *serno;
64 extern const unsigned long int datecode;
65 extern const char *ircd_version;
66 extern const char *logFileName;
67 extern const char *pidFileName;
68 extern volatile sig_atomic_t dorehash;
69 extern volatile sig_atomic_t dorehashbans;
70 extern volatile sig_atomic_t doremotd;
71 extern bool kline_queued;
72 extern bool server_state_foreground;
73 extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
74 accountability, etc */
75
76 extern struct Client me;
77 extern rb_dlink_list global_client_list;
78 extern struct Client *local[];
79 extern struct Counter Count;
80 extern int default_server_capabs;
81
82 extern time_t startup_time;
83
84 extern int splitmode;
85 extern int splitchecking;
86 extern int split_users;
87 extern int split_servers;
88 extern int eob_count;
89
90 extern rb_dlink_list unknown_list;
91 extern rb_dlink_list lclient_list;
92 extern rb_dlink_list serv_list;
93 extern rb_dlink_list global_serv_list;
94 extern rb_dlink_list local_oper_list;
95 extern rb_dlink_list oper_list;
96 extern rb_dlink_list dead_list;
97
98 extern int testing_conf;
99
100 extern struct ev_entry *check_splitmode_ev;
101
102 extern bool ircd_ssl_ok;
103 extern bool ircd_zlib_ok;
104 extern int maxconnections;
105
106 void ircd_shutdown(const char *reason) __attribute__((noreturn));
107
108 #endif