ngircd.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 __ngircd_h__
  12. #define __ngircd_h__
  13. /**
  14. * @file
  15. * Global variables of ngIRCd.
  16. */
  17. #include <time.h>
  18. #include "defines.h"
  19. #define C_ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
  20. /** UNIX timestamp of ngIRCd start */
  21. GLOBAL time_t NGIRCd_Start;
  22. /** ngIRCd start time as string, used for RPL_CREATED_MSG (003) */
  23. GLOBAL char NGIRCd_StartStr[64];
  24. /** ngIRCd version number containing release number and compile-time options */
  25. GLOBAL char NGIRCd_Version[126];
  26. /** String specifying the compile-time options and target platform */
  27. GLOBAL char NGIRCd_VersionAddition[126];
  28. #ifdef DEBUG
  29. /** Flag indicating if debug mode is active (true) or not (false) */
  30. GLOBAL bool NGIRCd_Debug;
  31. #endif
  32. #ifdef SNIFFER
  33. /** Flag indication if sniffer is active (true) or not (false) */
  34. GLOBAL bool NGIRCd_Sniffer;
  35. #endif
  36. /**
  37. * Flag indicating if NO outgoing connections should be established (true)
  38. * or not (false, the default)
  39. */
  40. GLOBAL bool NGIRCd_Passive;
  41. /** Flag indicating that ngIRCd has been requested to quit (true) */
  42. GLOBAL bool NGIRCd_SignalQuit;
  43. /** Flag indicating that ngIRCd has been requested to restart (true) */
  44. GLOBAL bool NGIRCd_SignalRestart;
  45. /**
  46. * Debug level for "VERSION" command, see description of numeric RPL_VERSION
  47. * (351) in RFC 2812. ngIRCd sets debuglevel to 1 when the debug mode is
  48. * active, and to 2 if the sniffer is running.
  49. */
  50. GLOBAL char NGIRCd_DebugLevel[2];
  51. /** Full path and file name of current configuration file */
  52. GLOBAL char NGIRCd_ConfFile[FNAME_LEN];
  53. /** Protocol and server identification string; see doc/Protocol.txt */
  54. GLOBAL char NGIRCd_ProtoID[COMMAND_LEN];
  55. #endif
  56. /* -eof- */