2007-01-25 07:40:21 +01:00
|
|
|
/*
|
|
|
|
* ircd-ratbox: A slightly useful ircd.
|
|
|
|
* defaults.h: The ircd defaults header.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
|
|
|
|
* Copyright (C) 1996-2002 Hybrid Development Team
|
|
|
|
* Copyright (C) 2002-2004 ircd-ratbox development team
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA
|
|
|
|
*/
|
|
|
|
|
2016-07-25 10:57:54 +02:00
|
|
|
#pragma once
|
|
|
|
#define HAVE_IRCD_DEFAULTS_H
|
2007-01-25 07:40:21 +01:00
|
|
|
|
2016-03-20 01:14:26 +01:00
|
|
|
/* /!\ DANGER WILL ROBINSON! DANGER! /!\
|
|
|
|
*
|
|
|
|
* Do not mess with these values unless you know what you are doing!
|
2007-01-25 07:40:21 +01:00
|
|
|
*/
|
|
|
|
|
2016-04-07 11:47:48 +02:00
|
|
|
/* The below are used as defaults if not found in the configuration file (or on ircd warm-up).
|
|
|
|
* Don't change these - edit the conf file instead.
|
|
|
|
*/
|
2016-07-25 10:57:54 +02:00
|
|
|
#ifdef __cplusplus
|
2016-08-13 02:38:20 +02:00
|
|
|
namespace ircd {
|
2016-07-31 03:50:27 +02:00
|
|
|
inline namespace defaults {
|
2016-07-25 10:57:54 +02:00
|
|
|
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto CLIENT_FLOOD_DEFAULT = 20; // default for client_flood
|
|
|
|
constexpr auto CLIENT_FLOOD_MAX = 2000;
|
|
|
|
constexpr auto CLIENT_FLOOD_MIN = 10;
|
|
|
|
constexpr auto LINKS_DELAY_DEFAULT = 300;
|
|
|
|
constexpr auto MAX_TARGETS_DEFAULT = 4; // default for max_targets */
|
|
|
|
constexpr auto IDENT_TIMEOUT_DEFAULT = 5;
|
|
|
|
constexpr auto BLACKLIST_TIMEOUT_DEFAULT = 10;
|
|
|
|
constexpr auto OPM_TIMEOUT_DEFAULT = 10;
|
|
|
|
constexpr auto RDNS_TIMEOUT_DEFAULT = 5;
|
|
|
|
constexpr auto MIN_JOIN_LEAVE_TIME = 60;
|
|
|
|
constexpr auto MAX_JOIN_LEAVE_COUNT = 25;
|
|
|
|
constexpr auto OPER_SPAM_COUNTDOWN = 5;
|
|
|
|
constexpr auto JOIN_LEAVE_COUNT_EXPIRE_TIME = 120;
|
|
|
|
constexpr auto MIN_SPAM_NUM = 5;
|
|
|
|
constexpr auto MIN_SPAM_TIME = 60;
|
|
|
|
constexpr auto HOSTLEN = 63; // Length of hostname.
|
|
|
|
|
|
|
|
constexpr auto DEFAULT_SENDQ = 20000000; // default max SendQ
|
|
|
|
constexpr auto PORTNUM = 6667; // default outgoing portnum
|
|
|
|
constexpr auto DEFAULT_PINGFREQUENCY = 120; // Default ping frequency
|
|
|
|
constexpr auto DEFAULT_CONNECTFREQUENCY = 600; // Default connect frequency
|
|
|
|
constexpr auto TS_MAX_DELTA_MIN = 10; // min value for ts_max_delta
|
|
|
|
constexpr auto TS_MAX_DELTA_DEFAULT = 600; // default for ts_max_delta
|
|
|
|
constexpr auto TS_WARN_DELTA_MIN = 10; // min value for ts_warn_delta
|
|
|
|
constexpr auto TS_WARN_DELTA_DEFAULT = 30; // default for ts_warn_delta
|
|
|
|
|
|
|
|
constexpr auto IRCD_RES_HOSTLEN = 255; // Longest hostname we're willing to work with due to DNSBLs this is more than HOSTLEN.
|
|
|
|
constexpr auto USERLEN = 10;
|
|
|
|
constexpr auto REALLEN = 50; // real name max length
|
|
|
|
constexpr auto CHANNELLEN = 200;
|
|
|
|
constexpr auto LOC_CHANNELLEN = 50;
|
|
|
|
|
|
|
|
|
|
|
|
// reason length of klines, parts, quits etc
|
|
|
|
/* for quit messages, note that a client exit server notice
|
|
|
|
* :012345678901234567890123456789012345678901234567890123456789123 NOTICE * :*** Notice -- Client exiting: 012345678901234567 (0123456789@012345678901234567890123456789012345678901234567890123456789123) [] [1111:2222:3333:4444:5555:6666:7777:8888]
|
|
|
|
* takes at most 246 bytes (including CRLF and '\0') and together with the
|
|
|
|
* quit reason should fit in 512 */
|
|
|
|
constexpr auto REASONLEN = 260; // kick/part/quit
|
|
|
|
constexpr auto BANREASONLEN = 390; // kline/dline
|
|
|
|
constexpr auto AWAYLEN = TOPICLEN;
|
|
|
|
constexpr auto KILLLEN = 200; // with Killed (nick ()) added this should fit in quit
|
|
|
|
constexpr auto MAX_DATE_STRING = 32; // maximum string length for a date string
|
|
|
|
constexpr auto HELPLEN = 400;
|
2016-08-13 05:05:54 +02:00
|
|
|
constexpr auto OPERNICKLEN = int(NICKLEN) * 2; // Length of OPERNICKs.
|
|
|
|
constexpr auto USERHOST_REPLYLEN = int(NICKLEN) + HOSTLEN + USERLEN + 5;
|
2016-07-25 10:57:54 +02:00
|
|
|
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto BUFSIZE = 512; // WARNING: *DONT* CHANGE THIS!!!!
|
|
|
|
constexpr auto MAXCONNECTIONS = 65536; // default max connections if getrlimit doesn't work
|
|
|
|
constexpr auto NETWORK_NAME_DEFAULT = "DefaultNet"; // default for network_name
|
2016-07-13 07:22:05 +02:00
|
|
|
|
|
|
|
|
2016-03-20 01:14:26 +01:00
|
|
|
/*
|
2016-07-13 07:22:05 +02:00
|
|
|
* message return values
|
2016-03-20 01:14:26 +01:00
|
|
|
*/
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto CLIENT_EXITED = -2;
|
|
|
|
constexpr auto CLIENT_PARSE_ERROR = -1;
|
|
|
|
constexpr auto CLIENT_OK = 1;
|
2016-07-13 07:22:05 +02:00
|
|
|
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto READBUF_SIZE = 16384; // Read buffer size */
|
2016-03-20 01:14:26 +01:00
|
|
|
|
2016-04-07 11:47:48 +02:00
|
|
|
|
|
|
|
/* Below are somewhat configurable settings (though it's probably a bad idea
|
|
|
|
* to blindly mess with them). If in any doubt, leave them alone.
|
|
|
|
*/
|
2016-03-20 01:14:26 +01:00
|
|
|
|
|
|
|
/* HANGONGOODLINK and HANGONRETRYDELAY
|
|
|
|
* Often net breaks for a short time and it's useful to try to
|
|
|
|
* establishing the same connection again faster than CONNECTFREQUENCY
|
|
|
|
* would allow. But, to keep trying on bad connection, we require
|
|
|
|
* that connection has been open for certain minimum time
|
|
|
|
* (HANGONGOODLINK) and we give the net few seconds to steady
|
|
|
|
* (HANGONRETRYDELAY). This latter has to be long enough that the
|
|
|
|
* other end of the connection has time to notice it broke too.
|
|
|
|
*/
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto HANGONRETRYDELAY = 60; /* Recommended value: 30-60 seconds */
|
|
|
|
constexpr auto HANGONGOODLINK = 3600; /* Recommended value: 30-60 minutes */
|
2016-03-20 01:14:26 +01:00
|
|
|
|
|
|
|
/* KILLCHASETIMELIMIT -
|
|
|
|
* Max time from the nickname change that still causes KILL
|
|
|
|
* automatically to switch for the current nick of that user. (seconds)
|
|
|
|
*/
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto KILLCHASETIMELIMIT = 90; /* Recommended value: 90 */
|
2016-03-20 01:14:26 +01:00
|
|
|
|
|
|
|
/* MAX_BUFFER
|
|
|
|
* The amount of fds to reserve for clients exempt from limits
|
|
|
|
* and dns lookups.
|
|
|
|
*/
|
2016-08-13 02:38:20 +02:00
|
|
|
constexpr auto MAX_BUFFER = 60;
|
2016-03-20 01:14:26 +01:00
|
|
|
|
2016-04-07 11:47:48 +02:00
|
|
|
/*
|
2016-03-20 01:14:26 +01:00
|
|
|
* Use SOMAXCONN if OS has it, otherwise use this value for the
|
|
|
|
* listen(); backlog. 5 for AIX/SUNOS, 25 for other OSs.
|
|
|
|
*/
|
2016-04-07 11:47:48 +02:00
|
|
|
#ifndef SOMAXCONN
|
2016-07-25 10:57:54 +02:00
|
|
|
# define SOMAXCONN 25
|
2016-04-07 11:47:48 +02:00
|
|
|
#endif
|
2016-03-20 01:14:26 +01:00
|
|
|
|
2016-07-25 10:57:54 +02:00
|
|
|
} // namespace defaults
|
|
|
|
} // namespace ircd
|
|
|
|
#endif // __cplusplus
|