Blame


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