Blob


1 /*
2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001-2003 by 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.52 2005/05/16 12:22:32 alex Exp $
12 *
13 * Global defines of ngIRCd.
14 */
16 #ifndef __defines_h__
17 #define __defines_h__
20 #define NONE -1
22 #define FNAME_LEN 256 /* max. length of file name */
24 #define LINE_LEN 256 /* max. length of a line in the configuration file */
26 #define HOST_LEN 256 /* max. lenght of fully qualified host names */
28 #define MAX_LISTEN_PORTS 16 /* max. count of listening ports */
30 #define MAX_OPERATORS 16 /* max. count of configurable operators */
32 #define MAX_SERVERS 16 /* max. count of configurable servers ("peers") */
34 #define MAX_DEFCHANNELS 16 /* max. count of preconfigurable channels */
36 #define MAX_SERVICES 8 /* max. number of configurable services */
38 #define MAX_WHOWAS 64 /* max. number of WHOWAS items */
39 #define DEFAULT_WHOWAS 5 /* default count for WHOWAS command */
41 #define CONNECTION_POOL 100 /* size of default connection pool */
43 #define CLIENT_ID_LEN 64 /* max. length of an IRC ID; see RFC 2812, 1.1 and 1.2.1 */
44 #define CLIENT_NICK_LEN 10 /* max. nick length; see. RFC 2812, 1.2.1 */
45 #define CLIENT_PASS_LEN 21 /* max. password length */
46 #define CLIENT_USER_LEN 9 /* max. length of user name ("login") */
47 #define CLIENT_NAME_LEN 32 /* max. length of "real names" */
48 #define CLIENT_HOST_LEN 64 /* max. host name length */
49 #define CLIENT_MODE_LEN 8 /* max. lenth of all client modes */
50 #define CLIENT_INFO_LEN 64 /* max. length of server info texts */
51 #define CLIENT_AWAY_LEN 128 /* max. length of away messages */
52 #define CLIENT_FLAGS_LEN 100 /* max. length of client flags */
54 #define CHANNEL_NAME_LEN 51 /* max. length of a channel name, see. RFC 2812, 1.3 */
55 #define CHANNEL_MODE_LEN 9 /* max. length of channel modes */
56 #define CHANNEL_TOPIC_LEN 128 /* max. length of a channel topic */
58 #define COMMAND_LEN 513 /* max. IRC command length, see. RFC 2812, 3.2 */
60 #define READBUFFER_LEN 2048 /* size of the read buffer of a connection (bytes) */
61 #define WRITEBUFFER_LEN 4096 /* size of the write buffer of a connection (bytes) */
63 #ifdef ZLIB
64 #define ZREADBUFFER_LEN 1024 /* compressed read buffer of a connection (bytes) */
65 #define ZWRITEBUFFER_LEN 4096 /* compressed write buffer of a connection (bytes) */
66 #endif
68 #define PROTOVER "0210" /* implemented IRC protocol version (see RFC 2813, 4.1.1) */
69 #define PROTOIRC "-IRC" /* protocol suffix (see RFC 2813, 4.1.1) */
70 #define PROTOIRCPLUS "-IRC+" /* protokol suffix for IRC+ protocol (see doc/Protocol.txt) */
72 #ifdef IRCPLUS
73 # define IRCPLUSFLAGS "CL" /* standard IRC+ flags */
74 #endif
76 #define STARTUP_DELAY 1 /* delay outgoing connections n seconds after startup */
77 #define RECONNECT_DELAY 3 /* time to delay re-connect attempts (seconds) */
79 #define USERMODES "aios" /* supported user modes */
80 #define CHANMODES "biklImnoPstv" /* supported channel modes */
82 #define CONNECTED true /* internal status codes */
83 #define DISCONNECTED false
85 #define DEFAULT_AWAY_MSG "Away" /* away message for users connected to linked servers */
87 #define CONFIG_FILE "/ngircd.conf"
88 #define MOTD_FILE "/ngircd.motd"
89 #define MOTD_PHRASE ""
90 #define CHROOT_DIR ""
91 #define PID_FILE ""
93 #define ERROR_DIR "/tmp"
95 #define MAX_LOG_MSG_LEN 256 /* max. length of a log message */
97 #define TOKEN_OUTBOUND -2 /* tag for outbound server links */
99 #define NOTICE_TXTPREFIX "" /* prefix for NOTICEs from the server to users */
101 #ifdef RENDEZVOUS
102 #define RENDEZVOUS_TYPE "_ircu._tcp." /* service type to register with Rendezvous */
103 #endif
106 #endif
109 /* -eof- */