defines.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.58.2.1 2007/05/18 22:11:19 alex Exp $
  12. */
  13. #ifndef __defines_h__
  14. #define __defines_h__
  15. /**
  16. * @file
  17. * Global constants ("#defines") used by the ngIRCd.
  18. */
  19. #define NONE -1
  20. #define FNAME_LEN 256 /* Max. length of file name */
  21. #define LINE_LEN 256 /* Max. length of a line in the
  22. configuration file */
  23. #define HOST_LEN 256 /* Max. lenght of fully qualified host
  24. names (e. g. "abc.domain.tld") */
  25. #define MAX_LISTEN_PORTS 16 /* Max. count of listening ports */
  26. #define MAX_OPERATORS 16 /* Max. count of configurable IRC Ops */
  27. #define MAX_SERVERS 16 /* Max. count of configurable servers */
  28. #define MAX_DEFCHANNELS 16 /* Max. count of predefined channels */
  29. #define MAX_SERVICES 8 /* Max. count of services */
  30. #define MAX_WHOWAS 64 /* Max. number of WHOWAS items */
  31. #define DEFAULT_WHOWAS 5 /* default count for WHOWAS command */
  32. #define CONNECTION_POOL 100 /* Size of default connection pool */
  33. #define CLIENT_ID_LEN 64 /* Max. length of an IRC ID; see RFC
  34. RFC 2812 section 1.1 and 1.2.1 */
  35. #define CLIENT_NICK_LEN 10 /* Max. nick length, see. RFC 2812
  36. section 1.2.1 */
  37. #define CLIENT_PASS_LEN 21 /* Max. password length */
  38. #define CLIENT_USER_LEN 10 /* Max. length of user name ("login")
  39. see RFC 2812, section 1.2.1 */
  40. #define CLIENT_NAME_LEN 32 /* Max. length of "real names" */
  41. #define CLIENT_HOST_LEN 64 /* Max. host name length */
  42. #define CLIENT_MODE_LEN 8 /* Max. lenth of all client modes */
  43. #define CLIENT_INFO_LEN 64 /* Max. length of server info texts */
  44. #define CLIENT_AWAY_LEN 128 /* Max. length of away messages */
  45. #define CLIENT_FLAGS_LEN 100 /* Max. length of client flags */
  46. #define CHANNEL_NAME_LEN 51 /* Max. length of a channel name, see
  47. RFC 2812 section 1.3 */
  48. #define CHANNEL_MODE_LEN 9 /* Max. length of channel modes */
  49. #define COMMAND_LEN 513 /* Max. IRC command length, see. RFC
  50. 2812 section 3.2 */
  51. #define READBUFFER_LEN 2048 /* Size of the read buffer of a
  52. connection in bytes. */
  53. #define WRITEBUFFER_LEN 4096 /* Size of the write buffer of a
  54. connection in bytes. */
  55. #define WRITEBUFFER_SLINK_LEN 51200 /* Size of the write buffer of a
  56. server link connection in bytes. */
  57. #define PROTOVER "0210" /* Implemented IRC protocol version,
  58. see RFC 2813 section 4.1.1. */
  59. #define PROTOIRC "-IRC" /* Protocol suffix, see RFC 2813
  60. section 4.1.1 */
  61. #define PROTOIRCPLUS "-IRC+" /* Protocol suffix used by the IRC+
  62. protocol, see doc/Protocol.txt */
  63. #ifdef IRCPLUS
  64. # define IRCPLUSFLAGS "CL" /* Standard IRC+ flags */
  65. #endif
  66. #define STARTUP_DELAY 1 /* Delay outgoing connections n seconds
  67. after startup. */
  68. #define RECONNECT_DELAY 3 /* Time to delay re-connect attempts
  69. in seconds. */
  70. #define USERMODES "aios" /* Supported user modes. */
  71. #define CHANMODES "biIklmnoPstv" /* Supported channel modes. */
  72. #define CONNECTED true /* Internal status codes. */
  73. #define DISCONNECTED false
  74. #define DEFAULT_AWAY_MSG "Away" /* Away message for users connected to
  75. linked servers. */
  76. #define DEFAULT_TOPIC_ID "-Server-" /* Default ID for "topic owner". */
  77. #define CONFIG_FILE "/ngircd.conf" /* Configuration file name. */
  78. #define MOTD_FILE "/ngircd.motd" /* Name of the MOTD file. */
  79. #define MOTD_PHRASE "" /* Default MOTD phrase string. */
  80. #define CHROOT_DIR "" /* Default chroot() directory. */
  81. #define PID_FILE "" /* Default file for the process ID. */
  82. #define ERROR_DIR "/tmp" /* Error directory used in debug mode */
  83. #define MAX_LOG_MSG_LEN 256 /* Max. length of a log message. */
  84. #define TOKEN_OUTBOUND -2 /* Tag for outbound server links. */
  85. #define NOTICE_TXTPREFIX "" /* Prefix for NOTICEs from the server
  86. to users. Some servers use '*'. */
  87. #define CUT_TXTSUFFIX "[CUT]" /* Suffix for oversized messages that
  88. have been shortened and cut off. */
  89. #ifdef ZEROCONF
  90. #define MDNS_TYPE "_ircu._tcp." /* Service type to register with mDNS */
  91. #endif
  92. #endif
  93. /* -eof- */