Author: Bleep <tomh@inxpress.net>
[ircu2.10.12-pk.git] / include / ircd.h
1 /*
2  * ircd.h
3  *
4  * $Id$
5  */
6 #ifndef INCLUDED_ircd_h
7 #define INCLUDED_ircd_h
8 #ifndef INCLUDED_config_h
9 #include "config.h"
10 #endif
11 #ifndef INCLUDED_struct_h
12 #include "struct.h"           /* struct Client */
13 #endif
14 #ifndef INCLUDED_sys_types_h
15 #include <sys/types.h>        /* size_t, time_t */
16 #endif
17
18
19 /*
20  * Macros
21  */
22 #define TStime() (CurrentTime + TSoffset)
23 #define OLDEST_TS 780000000     /* Any TS older than this is bogus */
24 #define BadPtr(x) (!(x) || (*(x) == '\0'))
25
26 /* Miscellaneous defines */
27
28 #define UDP_PORT        "7007"
29 #define MINOR_PROTOCOL  "09"
30 #define MAJOR_PROTOCOL  "10"
31 #define BASE_VERSION    "u2.10"
32
33 /* Flags for bootup options (command line flags) */
34
35 #define BOOT_QUICK  1
36 #define BOOT_DEBUG  2
37 #define BOOT_TTY    4
38
39 /*
40  * Proto types
41  */
42
43 extern void server_die(const char* message);
44 extern void server_restart(const char* message);
45
46 extern struct Client  me;
47 extern time_t         CurrentTime;
48 extern struct Client* GlobalClientList;
49 extern time_t         TSoffset;
50 extern unsigned int   bootopt;
51 extern time_t         nextdnscheck;
52 extern time_t         nextconnect;
53 extern int            GlobalRehashFlag;      /* 1 if SIGHUP is received */
54 extern int            GlobalRestartFlag;     /* 1 if SIGINT is received */
55 extern time_t         nextping;
56 extern char*          configfile;
57 extern int            debuglevel;
58 extern char*          debugmode;
59
60 #endif /* INCLUDED_ircd_h */
61