]>
Commit | Line | Data |
---|---|---|
189935b1 | 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 | #ifndef INCLUDED_ircd_defs_h | |
23 | #define INCLUDED_ircd_defs_h | |
24 | /** @file | |
25 | * @brief Definitions used everywhere in the server. | |
26 | * | |
27 | * NOTE: Changing any of these definitions (except for the | |
28 | * target-related ones at the bottom) is equivalent to a protocol | |
29 | * revision. Every server on a given network must use the same values. | |
30 | * @version $Id: ircd_defs.h,v 1.9 2004/10/05 02:21:08 entrope Exp $ | |
31 | */ | |
32 | ||
33 | /** Maximum length allowed for a nickname. | |
34 | * Because certain networks are very helpful in finding bugs, the below | |
35 | * is a default that can easily be overridden in CFLAGS. Just add | |
36 | * -DNICKLEN=15 to CFLAGS during configure, and you can forget about | |
37 | * it. Thanks for helping debug guys. | |
38 | * See also F:NICKLEN in ircd.conf. | |
39 | */ | |
40 | #ifndef NICKLEN | |
41 | #define NICKLEN 15 | |
42 | #endif | |
43 | /** Maximum length allowed of a user name, including an optional | |
44 | * leading '~' if the user name has not been authenticated by an auth (RFC 931) | |
45 | * server query. | |
46 | */ | |
47 | #define USERLEN 10 | |
48 | /** Exactly long enough to hold one (1) segment of FQDN or hostname. | |
49 | * This is due to an historical misinterpretation of RFC 1034. | |
50 | * 3.1. Name space specifications and terminology | |
51 | * | |
52 | * The domain name space is a tree structure. Each node and leaf on the | |
53 | * tree corresponds to a resource set (which may be empty). The domain | |
54 | * system makes no distinctions between the uses of the interior nodes and | |
55 | * leaves, and this memo uses the term "node" to refer to both. | |
56 | * | |
57 | * Each node has a label, which is zero to 63 octets in length. Brother | |
58 | * nodes may not have the same label, although the same label can be used | |
59 | * for nodes which are not brothers. One label is reserved, and that is | |
60 | * the null (i.e., zero length) label used for the root. | |
61 | * | |
62 | * This has proven not to be a problem in the past as connections with FQDN's | |
63 | * of greater than 63 characters are rejected by the server, and most FQDN's | |
64 | * are shorter. It is possible to have a valid FQDN longer than 63 characters. | |
65 | */ | |
66 | #define HOSTLEN 63 | |
67 | /** Maximum length for the account name, which can be set | |
68 | * with the ACCOUNT (AC) command. This is used for keeping track of who's | |
69 | * logged into which account, for the benefit of irc services. | |
70 | */ | |
71 | #define ACCOUNTLEN 12 | |
72 | /** Maximum length for user supplied information about a client | |
73 | * connection (gcos). This information is set at client/server registration | |
74 | * time. | |
75 | */ | |
76 | #define REALLEN 50 | |
77 | /** Maximum length for a password used for connecting servers and clients. | |
78 | */ | |
79 | #define PASSWDLEN 20 | |
80 | /** Maximum length of a numeric IP (v4 or v6) address. | |
81 | * "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255" | |
82 | */ | |
83 | #define SOCKIPLEN 45 | |
84 | /** Maximum length for channel topics and kill comments. | |
85 | */ | |
86 | #define TOPICLEN 160 | |
87 | /** Maximum length for away messages. | |
88 | */ | |
89 | #define AWAYLEN 160 | |
90 | /** Exactly long enough to hold one protocol message (RFC 1459) | |
91 | * including the line termination (\\r\\n). DO NOT CHANGE THIS!!!! | |
92 | */ | |
93 | #define BUFSIZE 512 | |
94 | ||
95 | /** Maximum available targets for a user. */ | |
96 | #define MAXTARGETS 20 | |
97 | /** Starting free targets for a user. */ | |
98 | #define STARTTARGETS 10 | |
99 | /** Target number to start assigning new targets. */ | |
100 | #define RESERVEDTARGETS 12 | |
101 | ||
102 | #endif /* INCLUDED_ircd_defs_h */ |