defines.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.2.2 2005/07/05 22:58:25 alex Exp $
  12. *
  13. * Global defines of ngIRCd.
  14. */
  15. #ifndef __defines_h__
  16. #define __defines_h__
  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 configuration file */
  20. #define HOST_LEN 256 /* max. lenght of fully qualified host names */
  21. #define MAX_LISTEN_PORTS 16 /* max. count of listening ports */
  22. #define MAX_OPERATORS 16 /* max. count of configurable operators */
  23. #define MAX_SERVERS 16 /* max. count of configurable servers ("peers") */
  24. #define MAX_DEFCHANNELS 16 /* max. count of preconfigurable channels */
  25. #define MAX_SERVICES 8 /* max. number of configurable services */
  26. #define MAX_WHOWAS 64 /* max. number of WHOWAS items */
  27. #define DEFAULT_WHOWAS 5 /* default count for WHOWAS command */
  28. #define CONNECTION_POOL 100 /* size of default connection pool */
  29. #define CLIENT_ID_LEN 64 /* max. length of an IRC ID; see RFC 2812, 1.1 and 1.2.1 */
  30. #define CLIENT_NICK_LEN 10 /* max. nick length; see. RFC 2812, 1.2.1 */
  31. #define CLIENT_PASS_LEN 21 /* max. password length */
  32. #define CLIENT_USER_LEN 10 /* Max. length of user name ("login")
  33. see RFC 2812, section 1.2.1 */
  34. #define CLIENT_NAME_LEN 32 /* max. length of "real names" */
  35. #define CLIENT_HOST_LEN 64 /* max. host name length */
  36. #define CLIENT_MODE_LEN 8 /* max. lenth of all client modes */
  37. #define CLIENT_INFO_LEN 64 /* max. length of server info texts */
  38. #define CLIENT_AWAY_LEN 128 /* max. length of away messages */
  39. #define CLIENT_FLAGS_LEN 100 /* max. length of client flags */
  40. #define CHANNEL_NAME_LEN 51 /* max. length of a channel name, see. RFC 2812, 1.3 */
  41. #define CHANNEL_MODE_LEN 9 /* max. length of channel modes */
  42. #define CHANNEL_TOPIC_LEN 128 /* max. length of a channel topic */
  43. #define COMMAND_LEN 513 /* max. IRC command length, see. RFC 2812, 3.2 */
  44. #define READBUFFER_LEN 2048 /* size of the read buffer of a connection (bytes) */
  45. #define WRITEBUFFER_LEN 4096 /* size of the write buffer of a connection (bytes) */
  46. #ifdef ZLIB
  47. #define ZREADBUFFER_LEN 1024 /* compressed read buffer of a connection (bytes) */
  48. #define ZWRITEBUFFER_LEN 4096 /* compressed write buffer of a connection (bytes) */
  49. #endif
  50. #define PROTOVER "0210" /* implemented IRC protocol version (see RFC 2813, 4.1.1) */
  51. #define PROTOIRC "-IRC" /* protocol suffix (see RFC 2813, 4.1.1) */
  52. #define PROTOIRCPLUS "-IRC+" /* protokol suffix for IRC+ protocol (see doc/Protocol.txt) */
  53. #ifdef IRCPLUS
  54. # define IRCPLUSFLAGS "CL" /* standard IRC+ flags */
  55. #endif
  56. #define STARTUP_DELAY 1 /* delay outgoing connections n seconds after startup */
  57. #define RECONNECT_DELAY 3 /* time to delay re-connect attempts (seconds) */
  58. #define USERMODES "aios" /* supported user modes */
  59. #define CHANMODES "biklImnoPstv" /* supported channel modes */
  60. #define CONNECTED true /* internal status codes */
  61. #define DISCONNECTED false
  62. #define DEFAULT_AWAY_MSG "Away" /* away message for users connected to linked servers */
  63. #define CONFIG_FILE "/ngircd.conf"
  64. #define MOTD_FILE "/ngircd.motd"
  65. #define MOTD_PHRASE ""
  66. #define CHROOT_DIR ""
  67. #define PID_FILE ""
  68. #define ERROR_DIR "/tmp"
  69. #define MAX_LOG_MSG_LEN 256 /* max. length of a log message */
  70. #define TOKEN_OUTBOUND -2 /* tag for outbound server links */
  71. #define NOTICE_TXTPREFIX "" /* prefix for NOTICEs from the server to users */
  72. #define CUT_TXTSUFFIX "[CUT]" /* Suffix for oversized messages that
  73. have been shortened and cut off. */
  74. #ifdef RENDEZVOUS
  75. #define RENDEZVOUS_TYPE "_ircu._tcp." /* service type to register with Rendezvous */
  76. #endif
  77. #endif
  78. /* -eof- */