fixed propagation of user mode changes (user should ALWAYS be notified)
[ircu2.10.12-pk.git] / include / ircd.h
1 /** @file ircd.h
2  * @brief Global data for the daemon.
3  * @version $Id: ircd.h 1229 2004-10-05 04:14:44Z entrope $
4  */
5 #ifndef INCLUDED_ircd_h
6 #define INCLUDED_ircd_h
7 #ifndef INCLUDED_struct_h
8 #include "struct.h"           /* struct Client */
9 #endif
10 #ifndef INCLUDED_sys_types_h
11 #include <sys/types.h>        /* size_t, time_t */
12 #endif
13
14 /* special unrestricted server */
15 // #define UNRESTRICTED_SERV
16
17
18 /** Describes status for a daemon. */
19 struct Daemon
20 {
21   int          argc;        /**< Number of command-line arguments. */
22   char**       argv;        /**< Array of command-line arguments. */
23   pid_t        pid;         /**< %Daemon's process id. */
24   uid_t        uid;         /**< %Daemon's user id. */
25   uid_t        euid;        /**< %Daemon's effective user id. */
26   unsigned int bootopt;     /**< Boot option flags. */
27   int          pid_fd;      /**< File descriptor for process id file. */
28 };
29
30 /*
31  * Macros
32  */
33 #define TStime() (CurrentTime + TSoffset) /**< Current network time*/
34 #define OLDEST_TS 780000000     /**< Any TS older than this is bogus */
35 #define BadPtr(x) (!(x) || (*(x) == '\0')) /**< Is \a x a bad string? */
36
37 /* Miscellaneous defines */
38
39 #define UDP_PORT        "7007"  /**< Default port for server-to-server pings. */
40 #define MINOR_PROTOCOL  "09"    /**< Minimum protocol version supported. */
41 #define MAJOR_PROTOCOL  "10"    /**< Current protocol version. */
42 #define BASE_VERSION    "u2.10" /**< Base name of IRC daemon version. */
43
44 /*
45  * Proto types
46  */
47 extern void server_die(const char* message);
48 extern void server_panic(const char* message);
49 extern void server_restart(const char* message);
50
51 extern struct Client  me;
52 extern time_t         CurrentTime;
53 extern struct Client* GlobalClientList;
54 extern time_t         TSoffset;
55 extern int            GlobalRehashFlag;      /* 1 if SIGHUP is received */
56 extern int            GlobalRestartFlag;     /* 1 if SIGINT is received */
57 extern char*          configfile;
58 extern int            debuglevel;
59 extern char*          debugmode;
60 extern int            running;
61
62 #endif /* INCLUDED_ircd_h */
63