2 * @brief Global data for the daemon.
3 * @version $Id: ircd.h 1229 2004-10-05 04:14:44Z entrope $
5 #ifndef INCLUDED_ircd_h
6 #define INCLUDED_ircd_h
7 #ifndef INCLUDED_struct_h
8 #include "struct.h" /* struct Client */
10 #ifndef INCLUDED_sys_types_h
11 #include <sys/types.h> /* size_t, time_t */
14 /* special unrestricted server */
15 // #define UNRESTRICTED_SERV
18 /** Describes status for a daemon. */
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. */
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? */
37 /* Miscellaneous defines */
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. */
47 extern void server_die(const char* message);
48 extern void server_panic(const char* message);
49 extern void server_restart(const char* message);
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;
63 #endif /* INCLUDED_ircd_h */