defines.h 4.1 KB

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