]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/defines.h
topic no longer limited to 127 chars (now only limited by protocol)
[ngircd-alex.git] / src / ngircd / defines.h
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * Copyright (c)2001-2005 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.56 2005/07/28 16:23:55 fw 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_LISTEN_PORTS 16             /* Max. count of listening ports */
34
35 #define MAX_OPERATORS 16                /* Max. count of configurable IRC Ops */
36
37 #define MAX_SERVERS 16                  /* Max. count of configurable servers */
38
39 #define MAX_DEFCHANNELS 16              /* Max. count of predefined channels */
40
41 #define MAX_SERVICES 8                  /* Max. count of services */
42
43 #define MAX_WHOWAS 64                   /* Max. number of WHOWAS items */
44 #define DEFAULT_WHOWAS 5                /* default count for WHOWAS command */
45
46 #define CONNECTION_POOL 100             /* Size of default connection pool */
47
48 #define CLIENT_ID_LEN 64                /* Max. length of an IRC ID; see RFC
49                                            RFC 2812 section 1.1 and 1.2.1 */
50 #define CLIENT_NICK_LEN 10              /* Max. nick length, see. RFC 2812
51                                            section 1.2.1 */
52 #define CLIENT_PASS_LEN 21              /* Max. password length */
53 #define CLIENT_USER_LEN 10              /* Max. length of user name ("login")
54                                            see RFC 2812, section 1.2.1 */
55 #define CLIENT_NAME_LEN 32              /* Max. length of "real names" */
56 #define CLIENT_HOST_LEN 64              /* Max. host name length */
57 #define CLIENT_MODE_LEN 8               /* Max. lenth of all client modes */
58 #define CLIENT_INFO_LEN 64              /* Max. length of server info texts */
59 #define CLIENT_AWAY_LEN 128             /* Max. length of away messages */
60 #define CLIENT_FLAGS_LEN 100            /* Max. length of client flags */
61
62 #define CHANNEL_NAME_LEN 51             /* Max. length of a channel name, see
63                                            RFC 2812 section 1.3 */
64 #define CHANNEL_MODE_LEN 9              /* Max. length of channel modes */
65
66 #define COMMAND_LEN 513                 /* Max. IRC command length, see. RFC
67                                            2812 section 3.2 */
68
69 #define READBUFFER_LEN 2048             /* Size of the read buffer of a
70                                            connection in bytes. */
71 #define WRITEBUFFER_LEN 4096            /* Size of the write buffer of a
72                                            connection in bytes. */
73
74 #ifdef ZLIB
75 #define ZREADBUFFER_LEN 1024            /* Size of the compressed read buffer
76                                            of a connection in bytes. */
77 #define ZWRITEBUFFER_LEN 4096           /* Size of the compressed write buffer
78                                            of a connection in bytes. */
79 #endif
80
81 #define PROTOVER "0210"                 /* Implemented IRC protocol version,
82                                            see RFC 2813 section 4.1.1. */
83 #define PROTOIRC "-IRC"                 /* Protocol suffix, see RFC 2813
84                                            section 4.1.1 */
85 #define PROTOIRCPLUS "-IRC+"            /* Protocol suffix used by the IRC+
86                                            protocol, see doc/Protocol.txt */
87
88 #ifdef IRCPLUS
89 # define IRCPLUSFLAGS "CL"              /* Standard IRC+ flags */
90 #endif
91
92 #define STARTUP_DELAY 1                 /* Delay outgoing connections n seconds
93                                            after startup. */
94 #define RECONNECT_DELAY 3               /* Time to delay re-connect attempts
95                                            in seconds. */
96
97 #define USERMODES "aios"                /* Supported user modes. */
98 #define CHANMODES "biklImnoPstv"        /* Supported channel modes. */
99
100 #define CONNECTED true                  /* Internal status codes. */
101 #define DISCONNECTED false
102
103 #define DEFAULT_AWAY_MSG "Away"         /* Away message for users connected to
104                                            linked servers. */
105
106 #define CONFIG_FILE "/ngircd.conf"      /* Configuration file name. */
107 #define MOTD_FILE "/ngircd.motd"        /* Name of the MOTD file. */
108 #define MOTD_PHRASE ""                  /* Default MOTD phrase string. */
109 #define CHROOT_DIR ""                   /* Default chroot() directory. */
110 #define PID_FILE ""                     /* Default file for the process ID. */
111
112 #define ERROR_DIR "/tmp"                /* Error directory used in debug mode */
113
114 #define MAX_LOG_MSG_LEN 256             /* Max. length of a log message. */
115
116 #define TOKEN_OUTBOUND -2               /* Tag for outbound server links. */
117
118 #define NOTICE_TXTPREFIX ""             /* Prefix for NOTICEs from the server
119                                            to users. Some servers use '*'. */
120
121 #define CUT_TXTSUFFIX "[CUT]"           /* Suffix for oversized messages that
122                                            have been shortened and cut off. */
123
124 #ifdef ZEROCONF
125 #define MDNS_TYPE "_ircu._tcp."         /* Service type to register with mDNS */
126 #endif
127
128
129 #endif
130
131
132 /* -eof- */