]>
jfr.im git - irc/quakenet/newserv.git/blob - core/main.c
a14a4adaac6cec10519eddb8a9970279b4127b7b
1 #include "../lib/sstring.h"
16 int newserv_shutdown_pending
;
17 int newserv_sigusr1_pending
;
21 void siginthandler(int sig
);
22 void sigusr1handler(int sig
);
24 int main(int argc
, char **argv
) {
37 initconfig("newserv.conf");
40 /* Loading the modules will bring in the bulk of the code */
42 signal(SIGINT
, siginthandler
);
43 signal(SIGUSR1
, sigusr1handler
);
48 doscheduledevents(time(NULL
));
49 if (newserv_shutdown_pending
) {
54 if (newserv_sigusr1_pending
) {
55 triggerhook(HOOK_CORE_SIGUSR1
, NULL
);
56 newserv_sigusr1_pending
=0;
67 * seed the pseudo-random number generator, rand()
72 gettimeofday(&t
, NULL
);
76 void siginthandler(int sig
) {
77 newserv_shutdown_pending
= 1;
80 void sigusr1handler(int sig
) {
81 newserv_sigusr1_pending
= 1;