]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/defines.h
defines.h: remove MAX_LISTEN_PORTS, MAX_SERVICES
[ngircd-alex.git] / src / ngircd / defines.h
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * Copyright (c)2001-2007 Alexander Barton (alex@barton.de)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  * Please read the file COPYING, README and AUTHORS for more information.
10  *
11  * $Id: defines.h,v 1.62 2007/11/21 12:16:36 alex Exp $
12  */
13
14
15 #ifndef __defines_h__
16 #define __defines_h__
17
18 /**
19  * @file
20  * Global constants ("#defines") used by the ngIRCd.
21  */
22
23 #define NONE -1
24
25 #define FNAME_LEN 256                   /* Max. length of file name */
26
27 #define LINE_LEN 256                    /* Max. length of a line in the
28                                            configuration file */
29
30 #define HOST_LEN 256                    /* Max. lenght of fully qualified host
31                                            names (e. g. "abc.domain.tld") */
32
33 #define MAX_OPERATORS 16                /* Max. count of configurable IRC Ops */
34
35 #define MAX_SERVERS 16                  /* Max. count of configurable servers */
36
37 #define MAX_WHOWAS 64                   /* Max. number of WHOWAS items */
38 #define DEFAULT_WHOWAS 5                /* default count for WHOWAS command */
39
40 #define CONNECTION_POOL 100             /* Size of default connection pool */
41
42 #define CLIENT_ID_LEN 64                /* Max. length of an IRC ID; see RFC
43                                            RFC 2812 section 1.1 and 1.2.1 */
44 #define CLIENT_NICK_LEN_DEFAULT 10      /* Default nick length, see. RFC 2812
45                                          * section 1.2.1 */
46 #define CLIENT_NICK_LEN 32              /* Maximum nick name length */
47 #define CLIENT_PASS_LEN 21              /* Max. password length */
48 #define CLIENT_USER_LEN 10              /* Max. length of user name ("login")
49                                            see RFC 2812, section 1.2.1 */
50 #define CLIENT_NAME_LEN 32              /* Max. length of "real names" */
51 #define CLIENT_HOST_LEN 64              /* Max. host name length */
52 #define CLIENT_MODE_LEN 9               /* Max. lenth of all client modes */
53 #define CLIENT_INFO_LEN 64              /* Max. length of server info texts */
54 #define CLIENT_AWAY_LEN 128             /* Max. length of away messages */
55 #define CLIENT_FLAGS_LEN 100            /* Max. length of client flags */
56
57 #define CHANNEL_NAME_LEN 51             /* Max. length of a channel name, see
58                                            RFC 2812 section 1.3 */
59 #define CHANNEL_MODE_LEN 9              /* Max. length of channel modes */
60
61 #define COMMAND_LEN 513                 /* Max. IRC command length, see. RFC
62                                            2812 section 3.2 */
63
64 #define READBUFFER_LEN 2048             /* Size of the read buffer of a
65                                            connection in bytes. */
66 #define WRITEBUFFER_LEN 4096            /* Size of the write buffer of a
67                                            connection in bytes. */
68 #define WRITEBUFFER_SLINK_LEN 51200     /* Size of the write buffer of a
69                                            server link connection in bytes. */
70
71 #define PROTOVER "0210"                 /* Implemented IRC protocol version,
72                                            see RFC 2813 section 4.1.1. */
73 #define PROTOIRC "-IRC"                 /* Protocol suffix, see RFC 2813
74                                            section 4.1.1 */
75 #define PROTOIRCPLUS "-IRC+"            /* Protocol suffix used by the IRC+
76                                            protocol, see doc/Protocol.txt */
77
78 #ifdef IRCPLUS
79 # define IRCPLUSFLAGS "CHLS"            /* Standard IRC+ flags */
80 #endif
81
82 #define STARTUP_DELAY 1                 /* Delay outgoing connections n seconds
83                                            after startup. */
84 #define RECONNECT_DELAY 3               /* Time to delay re-connect attempts
85                                            in seconds. */
86
87 #define USERMODES "aios"                /* Supported user modes. */
88 #define CHANMODES "biIklmnoPstv"        /* Supported channel modes. */
89
90 #define CONNECTED true                  /* Internal status codes. */
91 #define DISCONNECTED false
92
93 #define DEFAULT_AWAY_MSG "Away"         /* Away message for users connected to
94                                            linked servers. */
95
96 #define DEFAULT_TOPIC_ID "-Server-"     /* Default ID for "topic owner". */
97
98 #define CONFIG_FILE "/ngircd.conf"      /* Configuration file name. */
99 #define MOTD_FILE "/ngircd.motd"        /* Name of the MOTD file. */
100 #define MOTD_PHRASE ""                  /* Default MOTD phrase string. */
101 #define CHROOT_DIR ""                   /* Default chroot() directory. */
102 #define PID_FILE ""                     /* Default file for the process ID. */
103
104 #define ERROR_DIR "/tmp"                /* Error directory used in debug mode */
105
106 #define MAX_LOG_MSG_LEN 256             /* Max. length of a log message. */
107
108 #define TOKEN_OUTBOUND -2               /* Tag for outbound server links. */
109
110 #define NOTICE_TXTPREFIX ""             /* Prefix for NOTICEs from the server
111                                            to users. Some servers use '*'. */
112
113 #define CUT_TXTSUFFIX "[CUT]"           /* Suffix for oversized messages that
114                                            have been shortened and cut off. */
115
116 #ifdef ZEROCONF
117 #define MDNS_TYPE "_ircu._tcp."         /* Service type to register with mDNS */
118 #endif
119
120
121 #endif
122
123
124 /* -eof- */