Author: Alex Badea <decampos@users.sourceforge.net>
[ircu2.10.12-pk.git] / include / ircd_defs.h
1 /*
2  * IRC - Internet Relay Chat, include/ircd_defs.h
3  * Copyright (C) 1990 Jarkko Oikarinen and
4  *                    University of Oulu, Computing Center
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  * Commentary by Bleep (Thomas Helvey)
21  *
22  * $Id$
23  */
24 #ifndef INCLUDED_ircd_defs_h
25 #define INCLUDED_ircd_defs_h
26 /*
27  * Definitions used everywhere in the server
28  * NOTE: Changing any of these definitions is equivalent to a protocol
29  * revision. Every server on a given network must also use the same sizes.
30  */
31
32 /*
33  * NICKLEN is the maximum length allowed for a nickname
34  *
35  * Because certain networks are very helpful in finding bugs, the below
36  * is a default that can easily be overridden in CFLAGS.  Just add 
37  * -DNICKLEN=15 to CFLAGS and save your config in .., and you can forget about
38  * it.  Thanks for helping debug guys.
39  * See also F:NICKLEN in ircd.conf.
40  */
41 #ifndef NICKLEN
42 #define NICKLEN         15
43 #endif
44 /*
45  * USERLEN is the maximum length allowed of a user name including an optional
46  * leading '~' if the user name has not been authenticated by an auth (RFC 931)
47  * server query.
48  */
49 #define USERLEN         10
50 /*
51  * HOSTLEN is exactly long enough to hold one (1) segment of FQDN or hostname.
52  * This is due to an historical misinterpretation of RFC 1034.
53  * 3.1. Name space specifications and terminology
54  *
55  * The domain name space is a tree structure.  Each node and leaf on the
56  * tree corresponds to a resource set (which may be empty).  The domain
57  * system makes no distinctions between the uses of the interior nodes and
58  * leaves, and this memo uses the term "node" to refer to both.
59  *
60  * Each node has a label, which is zero to 63 octets in length.  Brother
61  * nodes may not have the same label, although the same label can be used
62  * for nodes which are not brothers.  One label is reserved, and that is
63  * the null (i.e., zero length) label used for the root.
64  *
65  * This has proven not to be a problem in the past as connections with FQDN's
66  * of greater than 63 characters are rejected by the server, and most FQDN's
67  * are shorter. It is possible to have a valid FQDN longer than 63 characters.
68  */
69 #define HOSTLEN         63
70 /*
71  * ACCOUNTLEN is the maximum length for the account name, which can be set
72  * with the ACCOUNT (AC) command.  This is used for keeping track of who's
73  * logged into which account, for the benefit of irc services.
74  */
75 #define ACCOUNTLEN      12
76 /*
77  * REALLEN is the maximum length for user supplied information about a client
78  * connection (gcos). This information is set at client/server registration
79  * time.
80  */
81 #define REALLEN         50
82 /*
83  * PASSWDLEN is the maximum length for a password used for connecting servers
84  * and clients.
85  */
86 #define PASSWDLEN       20
87 /*
88  * SOCKIPLEN is the maximum length of a numeric IP (v4 or v6) address
89  * "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"
90  */
91 #define SOCKIPLEN 45
92 /*
93  * TOPICLEN is the maximum length for channel topics and kill comments
94  */
95 #define TOPICLEN        160
96 /*
97  * AWAYLEN is the maximum length for away messages
98  */
99 #define AWAYLEN         160
100 /*
101  * BUFSIZE is exactly long enough to hold one protocol message (RFC 1459)
102  * including the line termination (\r\n).
103  */
104 #define BUFSIZE         512     /* WARNING: *DONT* CHANGE THIS!!!! */
105
106 #define MAXTARGETS      20
107 #define STARTTARGETS    10
108 #define RESERVEDTARGETS 12
109
110 #define MAP_CACHE_TIME 604800
111
112 #endif /* INCLUDED_ircd_defs_h */