532 |
|
init_resolver(); /* Needs to be setup before the io loop */ |
533 |
|
modules_init(); |
534 |
|
read_conf_files(1); /* cold start init conf files */ |
535 |
– |
init_uid(); |
535 |
|
initialize_server_capabs(); /* Set up default_server_capabs */ |
536 |
|
initialize_global_set_options(); /* Has to be called after read_conf_files() */ |
537 |
|
channel_init(); |
542 |
|
geoip_ctx = GeoIP_new(GEOIP_MEMORY_CACHE); |
543 |
|
#endif |
544 |
|
|
546 |
– |
if (EmptyString(ConfigServerInfo.sid)) |
547 |
– |
{ |
548 |
– |
ilog(LOG_TYPE_IRCD, "ERROR: No server id specified in serverinfo block."); |
549 |
– |
exit(EXIT_FAILURE); |
550 |
– |
} |
551 |
– |
|
552 |
– |
strlcpy(me.id, ConfigServerInfo.sid, sizeof(me.id)); |
553 |
– |
|
545 |
|
if (EmptyString(ConfigServerInfo.name)) |
546 |
|
{ |
547 |
|
ilog(LOG_TYPE_IRCD, "ERROR: No server name specified in serverinfo block."); |
559 |
|
|
560 |
|
strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info)); |
561 |
|
|
562 |
+ |
if (EmptyString(ConfigServerInfo.sid)) |
563 |
+ |
{ |
564 |
+ |
ilog(LOG_TYPE_IRCD, "Generating server ID"); |
565 |
+ |
generate_sid(); |
566 |
+ |
} |
567 |
+ |
else |
568 |
+ |
{ |
569 |
+ |
strlcpy(me.id, ConfigServerInfo.sid, sizeof(me.id)); |
570 |
+ |
} |
571 |
+ |
|
572 |
|
me.from = &me; |
573 |
|
me.servptr = &me; |
574 |
|
me.connection->lasttime = CurrentTime; |
583 |
|
|
584 |
|
dlinkAdd(&me, make_dlink_node(), &global_server_list); |
585 |
|
|
586 |
+ |
init_uid(); |
587 |
+ |
|
588 |
|
load_kline_database(); |
589 |
|
load_dline_database(); |
590 |
|
load_xline_database(); |