]>
jfr.im git - irc/quakenet/snircd.git/blob - include/ircd.h
2 * @brief Global data for the daemon.
3 * @version $Id: ircd.h,v 1.14 2004/10/05 04:14:44 entrope Exp $
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 /** Describes status for a daemon. */
17 int argc
; /**< Number of command-line arguments. */
18 char** argv
; /**< Array of command-line arguments. */
19 pid_t pid
; /**< %Daemon's process id. */
20 uid_t uid
; /**< %Daemon's user id. */
21 uid_t euid
; /**< %Daemon's effective user id. */
22 unsigned int bootopt
; /**< Boot option flags. */
23 int pid_fd
; /**< File descriptor for process id file. */
29 #define TStime() (CurrentTime + TSoffset) /**< Current network time*/
30 #define OLDEST_TS 780000000 /**< Any TS older than this is bogus */
31 #define BadPtr(x) (!(x) || (*(x) == '\0')) /**< Is \a x a bad string? */
33 /* Miscellaneous defines */
35 #define UDP_PORT "7007" /**< Default port for server-to-server pings. */
36 #define MINOR_PROTOCOL "09" /**< Minimum protocol version supported. */
37 #define MAJOR_PROTOCOL "10" /**< Current protocol version. */
38 #define BASE_VERSION "u2.10" /**< Base name of IRC daemon version. */
43 extern void server_die(const char* message
);
44 extern void server_panic(const char* message
);
45 extern void server_restart(const char* message
);
47 extern struct Client me
;
48 extern time_t CurrentTime
;
49 extern struct Client
* GlobalClientList
;
50 extern time_t TSoffset
;
51 extern int GlobalRehashFlag
; /* 1 if SIGHUP is received */
52 extern int GlobalRestartFlag
; /* 1 if SIGINT is received */
53 extern char* configfile
;
54 extern int debuglevel
;
55 extern char* debugmode
;
58 #endif /* INCLUDED_ircd_h */