]> jfr.im git - solanum.git/blob - include/defaults.h
Rename authd.[ch] on ircd side to authproc.[ch] to prevent shadowing.
[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 /*
36 * First, set other fd limits based on values from user
37 */
38
39 typedef enum {
40 IRCD_PATH_PREFIX,
41 IRCD_PATH_MODULES,
42 IRCD_PATH_AUTOLOAD_MODULES,
43 IRCD_PATH_ETC,
44 IRCD_PATH_LOG,
45 IRCD_PATH_USERHELP,
46 IRCD_PATH_OPERHELP,
47 IRCD_PATH_IRCD_EXEC,
48 IRCD_PATH_IRCD_CONF,
49 IRCD_PATH_IRCD_MOTD,
50 IRCD_PATH_IRCD_LOG,
51 IRCD_PATH_IRCD_PID,
52 IRCD_PATH_IRCD_OMOTD,
53 IRCD_PATH_BANDB,
54 IRCD_PATH_BIN,
55 IRCD_PATH_LIBEXEC,
56 IRCD_PATH_COUNT
57 } ircd_path_t;
58
59 extern const char *ircd_paths[IRCD_PATH_COUNT];
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 "EFnet" /* 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 MIN_JOIN_LEAVE_TIME 60
81 #define MAX_JOIN_LEAVE_COUNT 25
82 #define OPER_SPAM_COUNTDOWN 5
83 #define JOIN_LEAVE_COUNT_EXPIRE_TIME 120
84 #define MIN_SPAM_NUM 5
85 #define MIN_SPAM_TIME 60
86
87 /*
88 * Directory paths and filenames for UNIX systems.
89 * IRCD_PREFIX is set using ./configure --prefix, see INSTALL.
90 *
91 * IRCD_PREFIX = prefix for all directories,
92 * DPATH = root directory of installation,
93 * BINPATH = directory for binary files,
94 * ETCPATH = directory for configuration files,
95 * LOGPATH = directory for logfiles,
96 * MODPATH = directory for modules,
97 * AUTOMODPATH = directory for autoloaded modules
98 */
99
100 #define DPATH IRCD_PREFIX
101 #define BINPATH IRCD_PREFIX "/bin/"
102 #define MODPATH MODULE_DIR
103 #define AUTOMODPATH MODULE_DIR "/autoload/"
104 #define ETCPATH ETC_DIR
105 #define LOGPATH LOG_DIR
106 #define UHPATH HELP_DIR "/users"
107 #define HPATH HELP_DIR "/opers"
108 #define SPATH BINPATH "/" PROGRAM_PREFIX "charybdis" /* ircd executable */
109 #define CPATH ETCPATH "/ircd.conf" /* ircd.conf file */
110 #define MPATH ETCPATH "/ircd.motd" /* MOTD file */
111 #define LPATH LOGPATH "/ircd.log" /* ircd logfile */
112 #define PPATH PKGRUNDIR "/ircd.pid" /* pid file */
113 #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */
114 #define DBPATH PKGLOCALSTATEDIR "/ban.db" /* bandb file */
115
116 /* HANGONGOODLINK and HANGONRETRYDELAY
117 * Often net breaks for a short time and it's useful to try to
118 * establishing the same connection again faster than CONNECTFREQUENCY
119 * would allow. But, to keep trying on bad connection, we require
120 * that connection has been open for certain minimum time
121 * (HANGONGOODLINK) and we give the net few seconds to steady
122 * (HANGONRETRYDELAY). This latter has to be long enough that the
123 * other end of the connection has time to notice it broke too.
124 */
125 #define HANGONRETRYDELAY 60 /* Recommended value: 30-60 seconds */
126 #define HANGONGOODLINK 3600 /* Recommended value: 30-60 minutes */
127
128 /* KILLCHASETIMELIMIT -
129 * Max time from the nickname change that still causes KILL
130 * automatically to switch for the current nick of that user. (seconds)
131 */
132 #define KILLCHASETIMELIMIT 90 /* Recommended value: 90 */
133
134 /* MAX_BUFFER
135 * The amount of fds to reserve for clients exempt from limits
136 * and dns lookups.
137 */
138 #define MAX_BUFFER 60
139
140 /* CHARYBDIS_SOMAXCONN
141 * Use SOMAXCONN if OS has it, otherwise use this value for the
142 * listen(); backlog. 5 for AIX/SUNOS, 25 for other OSs.
143 */
144 #define CHARYBDIS_SOMAXCONN 25
145
146 #endif /* INCLUDED_defaults_h */