defines.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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_FLUSH_LEN 4096 /* Size of a write buffer that triggers
  49. buffer flushing if more space is
  50. needed for storing data. */
  51. #define WRITEBUFFER_MAX_LEN 32768 /* Maximum size of the write buffer of a
  52. connection in bytes. */
  53. #define WRITEBUFFER_SLINK_LEN 65536 /* Maximum size of the write buffer of a
  54. server link connection in bytes. */
  55. #define PROTOVER "0210" /* Implemented IRC protocol version,
  56. see RFC 2813 section 4.1.1. */
  57. #define PROTOIRC "-IRC" /* Protocol suffix, see RFC 2813
  58. section 4.1.1 */
  59. #define PROTOIRCPLUS "-IRC+" /* Protocol suffix used by the IRC+
  60. protocol, see doc/Protocol.txt */
  61. #ifdef IRCPLUS
  62. # define IRCPLUSFLAGS "CHLS" /* Standard IRC+ flags */
  63. #endif
  64. #define STARTUP_DELAY 1 /* Delay outgoing connections n seconds
  65. after startup. */
  66. #define RECONNECT_DELAY 3 /* Time to delay re-connect attempts
  67. in seconds. */
  68. #define USERMODES "aciorswx" /* Supported user modes. */
  69. #define CHANMODES "biIklmnoOPstvz" /* Supported channel modes. */
  70. #define CONNECTED true /* Internal status codes. */
  71. #define DISCONNECTED false
  72. #define DEFAULT_AWAY_MSG "Away" /* Away message for users connected to
  73. linked servers. */
  74. #define DEFAULT_TOPIC_ID "-Server-" /* Default ID for "topic owner". */
  75. #define CONFIG_FILE "/ngircd.conf" /* Configuration file name. */
  76. #define MOTD_FILE "/ngircd.motd" /* Name of the MOTD file. */
  77. #define CHROOT_DIR "" /* Default chroot() directory. */
  78. #define PID_FILE "" /* Default file for the process ID. */
  79. #define ERROR_DIR "/tmp" /* Error directory used in debug mode */
  80. #define MAX_LOG_MSG_LEN 256 /* Max. length of a log message. */
  81. #define TOKEN_OUTBOUND -2 /* Tag for outbound server links. */
  82. #define NOTICE_TXTPREFIX "" /* Prefix for NOTICEs from the server
  83. to users. Some servers use '*'. */
  84. #define CUT_TXTSUFFIX "[CUT]" /* Suffix for oversized messages that
  85. have been shortened and cut off. */
  86. #endif
  87. /* -eof- */