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