36 |
|
#include "ircd_signal.h" |
37 |
|
#include "s_gline.h" |
38 |
|
#include "motd.h" |
39 |
+ |
#include "conf.h" |
40 |
|
#include "hostmask.h" |
41 |
|
#include "numeric.h" |
42 |
|
#include "packet.h" |
46 |
|
#include "rng_mt.h" |
47 |
|
#include "s_auth.h" |
48 |
|
#include "s_bsd.h" |
48 |
– |
#include "conf.h" |
49 |
|
#include "log.h" |
50 |
|
#include "s_misc.h" |
51 |
|
#include "s_serv.h" /* try_connections */ |
59 |
|
#include "motd.h" |
60 |
|
#include "supported.h" |
61 |
|
#include "watch.h" |
62 |
< |
|
62 |
> |
#include "conf_db.h" |
63 |
> |
#include "conf_class.h" |
64 |
|
|
65 |
|
/* /quote set variables */ |
66 |
|
struct SetOptions GlobalSetOptions; |
83 |
|
const char *pidFileName = PPATH; |
84 |
|
|
85 |
|
char **myargv; |
85 |
– |
char ircd_platform[PLATFORMLEN]; |
86 |
|
|
87 |
|
int dorehash = 0; |
88 |
|
int doremotd = 0; |
175 |
|
{ |
176 |
|
ilog(LOG_TYPE_IRCD, "Clock Failure (%s), TS can be corrupted", |
177 |
|
strerror(errno)); |
178 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, |
178 |
> |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
179 |
|
"Clock Failure (%s), TS can be corrupted", |
180 |
|
strerror(errno)); |
181 |
|
restart("Clock Failure"); |
244 |
|
if (doremotd) |
245 |
|
{ |
246 |
|
read_message_file(&ConfigFileEntry.motd); |
247 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, |
247 |
> |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
248 |
|
"Got signal SIGUSR1, reloading ircd motd file"); |
249 |
|
doremotd = 0; |
250 |
|
} |
299 |
|
initialize_message_files(void) |
300 |
|
{ |
301 |
|
init_message_file(USER_MOTD, MPATH, &ConfigFileEntry.motd); |
302 |
– |
init_message_file(OPER_MOTD, OPATH, &ConfigFileEntry.opermotd); |
302 |
|
init_message_file(USER_LINKS, LIPATH, &ConfigFileEntry.linksfile); |
303 |
|
|
304 |
|
read_message_file(&ConfigFileEntry.motd); |
306 |
– |
read_message_file(&ConfigFileEntry.opermotd); |
305 |
|
read_message_file(&ConfigFileEntry.linksfile); |
306 |
|
|
307 |
|
init_isupport(); |
506 |
|
ConfigFileEntry.configfile = CPATH; /* Server configuration file */ |
507 |
|
ConfigFileEntry.klinefile = KPATH; /* Server kline file */ |
508 |
|
ConfigFileEntry.xlinefile = XPATH; /* Server xline file */ |
511 |
– |
ConfigFileEntry.rxlinefile = RXPATH; /* Server regex xline file */ |
512 |
– |
ConfigFileEntry.rklinefile = RKPATH; /* Server regex kline file */ |
509 |
|
ConfigFileEntry.dlinefile = DLPATH; /* dline file */ |
510 |
< |
ConfigFileEntry.glinefile = GPATH; /* gline log file */ |
511 |
< |
ConfigFileEntry.cresvfile = CRESVPATH; /* channel resv file */ |
516 |
< |
ConfigFileEntry.nresvfile = NRESVPATH; /* nick resv file */ |
510 |
> |
// ConfigFileEntry.cresvfile = CRESVPATH; /* channel resv file */ |
511 |
> |
// ConfigFileEntry.nresvfile = NRESVPATH; /* nick resv file */ |
512 |
|
myargv = argv; |
513 |
|
umask(077); /* better safe than sorry --SRB */ |
514 |
|
|
538 |
|
|
539 |
|
setup_signals(); |
540 |
|
|
546 |
– |
get_ircd_platform(ircd_platform); |
547 |
– |
|
541 |
|
/* Init the event subsystem */ |
542 |
|
eventInit(); |
543 |
|
/* We need this to initialise the fd array before anything else */ |
556 |
|
init_hash(); |
557 |
|
init_ip_hash_table(); /* client host ip hash table */ |
558 |
|
init_host_hash(); /* Host-hashtable. */ |
566 |
– |
clear_tree_parse(); |
559 |
|
init_client(); |
560 |
< |
init_class(); |
561 |
< |
init_whowas(); |
560 |
> |
class_init(); |
561 |
> |
whowas_init(); |
562 |
|
watch_init(); |
563 |
|
init_auth(); /* Initialise the auth code */ |
564 |
|
init_resolver(); /* Needs to be setup before the io loop */ |
565 |
+ |
modules_init(); |
566 |
|
read_conf_files(1); /* cold start init conf files */ |
567 |
|
init_uid(); |
568 |
|
initialize_server_capabs(); /* Set up default_server_capabs */ |
609 |
|
/* add ourselves to global_serv_list */ |
610 |
|
dlinkAdd(&me, make_dlink_node(), &global_serv_list); |
611 |
|
|
612 |
+ |
load_kline_database(); |
613 |
+ |
load_dline_database(); |
614 |
+ |
load_gline_database(); |
615 |
+ |
load_xline_database(); |
616 |
+ |
load_resv_database(); |
617 |
+ |
|
618 |
|
if (chdir(MODPATH)) |
619 |
|
{ |
620 |
|
ilog(LOG_TYPE_IRCD, "Could not load core modules. Terminating!"); |
652 |
|
/* Setup the timeout check. I'll shift it later :) -- adrian */ |
653 |
|
eventAddIsh("comm_checktimeouts", comm_checktimeouts, NULL, 1); |
654 |
|
|
655 |
+ |
eventAddIsh("save_all_databases", save_all_databases, NULL, DATABASE_UPDATE_TIMEOUT); |
656 |
+ |
|
657 |
|
if (ConfigServerHide.links_delay > 0) |
658 |
|
eventAddIsh("write_links_file", write_links_file, NULL, ConfigServerHide.links_delay); |
659 |
|
else |