]> jfr.im git - solanum.git/blob - include/defaults.h
Keep propagated bans in a dictionary, not a list
[solanum.git] / include / defaults.h
1 /*
2 * ircd-ratbox: A slightly useful ircd.
3 * defaults.h: The ircd defaults header.
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_defaults_h
26 #define INCLUDED_defaults_h
27
28 /* /!\ DANGER WILL ROBINSON! DANGER! /!\
29 *
30 * Do not mess with these values unless you know what you are doing!
31 */
32
33 #include "setup.h"
34
35 /* Below are the elements for default paths. */
36 typedef enum {
37 IRCD_PATH_PREFIX,
38 IRCD_PATH_MODULES,
39 IRCD_PATH_AUTOLOAD_MODULES,
40 IRCD_PATH_ETC,
41 IRCD_PATH_LOG,
42 IRCD_PATH_USERHELP,
43 IRCD_PATH_OPERHELP,
44 IRCD_PATH_IRCD_EXEC,
45 IRCD_PATH_IRCD_CONF,
46 IRCD_PATH_IRCD_MOTD,
47 IRCD_PATH_IRCD_LOG,
48 IRCD_PATH_IRCD_PID,
49 IRCD_PATH_IRCD_OMOTD,
50 IRCD_PATH_BANDB,
51 IRCD_PATH_BIN,
52 IRCD_PATH_LIBEXEC,
53 IRCD_PATH_COUNT
54 } ircd_path_t;
55
56 extern const char *ircd_paths[IRCD_PATH_COUNT];
57
58 /* The below are used as defaults if not found in the configuration file (or on ircd warm-up).
59 * Don't change these - edit the conf file instead.
60 */
61 #define MAXCONNECTIONS 65535 /* default max connections if getrlimit doesn't work */
62 /* class {} default values */
63 #define DEFAULT_SENDQ 20000000 /* default max SendQ */
64 #define PORTNUM 6667 /* default outgoing portnum */
65 #define DEFAULT_PINGFREQUENCY 120 /* Default ping frequency */
66 #define DEFAULT_CONNECTFREQUENCY 600 /* Default connect frequency */
67 #define TS_MAX_DELTA_MIN 10 /* min value for ts_max_delta */
68 #define TS_MAX_DELTA_DEFAULT 600 /* default for ts_max_delta */
69 #define TS_WARN_DELTA_MIN 10 /* min value for ts_warn_delta */
70 #define TS_WARN_DELTA_DEFAULT 30 /* default for ts_warn_delta */
71 /* ServerInfo default values */
72 #define NETWORK_NAME_DEFAULT "DefaultNet" /* default for network_name */
73 /* General defaults */
74 #define CLIENT_FLOOD_DEFAULT 20 /* default for client_flood */
75 #define CLIENT_FLOOD_MAX 2000
76 #define CLIENT_FLOOD_MIN 10
77 #define LINKS_DELAY_DEFAULT 300
78 #define MAX_TARGETS_DEFAULT 4 /* default for max_targets */
79 #define IDENT_TIMEOUT_DEFAULT 5
80 #define DNSBL_TIMEOUT_DEFAULT 10
81 #define OPM_TIMEOUT_DEFAULT 10
82 #define RDNS_TIMEOUT_DEFAULT 5
83 #define MIN_JOIN_LEAVE_TIME 60
84 #define MAX_JOIN_LEAVE_COUNT 25
85 #define OPER_SPAM_COUNTDOWN 5
86 #define JOIN_LEAVE_COUNT_EXPIRE_TIME 120
87 #define MIN_SPAM_NUM 5
88 #define MIN_SPAM_TIME 60
89
90 /*
91 * Directory paths and filenames for UNIX systems.
92 * IRCD_PREFIX is set using ./configure --prefix, see INSTALL.
93 * Do not change these without corresponding changes in the build system.
94 *
95 * IRCD_PREFIX = prefix for all directories,
96 * DPATH = root directory of installation,
97 * BINPATH = directory for binary files,
98 * ETCPATH = directory for configuration files,
99 * LOGPATH = directory for logfiles,
100 * MODPATH = directory for modules,
101 * AUTOMODPATH = directory for autoloaded modules
102 */
103
104 #define DPATH IRCD_PREFIX
105 #define BINPATH IRCD_PREFIX "/bin/"
106 #define MODPATH MODULE_DIR
107 #define AUTOMODPATH MODULE_DIR "/autoload/"
108 #define ETCPATH ETC_DIR
109 #define LOGPATH LOG_DIR
110 #define UHPATH HELP_DIR "/users"
111 #define HPATH HELP_DIR "/opers"
112 #define SPATH BINPATH "/" PROGRAM_PREFIX "/" BRANDING_NAME /* ircd executable */
113 #define CPATH ETCPATH "/ircd.conf" /* ircd.conf file */
114 #define MPATH ETCPATH "/ircd.motd" /* MOTD file */
115 #define LPATH LOGPATH "/ircd.log" /* ircd logfile */
116 #define PPATH PKGRUNDIR "/ircd.pid" /* pid file */
117 #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */
118 #define DBPATH PKGLOCALSTATEDIR "/ban.db" /* bandb file */
119
120 /* Below are somewhat configurable settings (though it's probably a bad idea
121 * to blindly mess with them). If in any doubt, leave them alone.
122 */
123
124 /* HANGONGOODLINK and HANGONRETRYDELAY
125 * Often net breaks for a short time and it's useful to try to
126 * establishing the same connection again faster than CONNECTFREQUENCY
127 * would allow. But, to keep trying on bad connection, we require
128 * that connection has been open for certain minimum time
129 * (HANGONGOODLINK) and we give the net few seconds to steady
130 * (HANGONRETRYDELAY). This latter has to be long enough that the
131 * other end of the connection has time to notice it broke too.
132 */
133 #define HANGONRETRYDELAY 60 /* Recommended value: 30-60 seconds */
134 #define HANGONGOODLINK 3600 /* Recommended value: 30-60 minutes */
135
136 /* KILLCHASETIMELIMIT -
137 * Max time from the nickname change that still causes KILL
138 * automatically to switch for the current nick of that user. (seconds)
139 */
140 #define KILLCHASETIMELIMIT 90 /* Recommended value: 90 */
141
142 /* MAX_BUFFER
143 * The amount of fds to reserve for clients exempt from limits
144 * and dns lookups.
145 */
146 #define MAX_BUFFER 60
147
148 /*
149 * Use SOMAXCONN if OS has it, otherwise use this value for the
150 * listen(); backlog. 5 for AIX/SUNOS, 25 for other OSs.
151 */
152 #ifndef SOMAXCONN
153 # define SOMAXCONN 25
154 #endif
155
156 #endif /* INCLUDED_defaults_h */