ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/ircd.c (file contents):
Revision 6155 by michael, Tue Apr 21 21:49:58 2015 UTC vs.
Revision 6156 by michael, Thu Jun 18 09:19:25 2015 UTC

# Line 532 | Line 532 | main(int argc, char *argv[])
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();
# Line 543 | Line 542 | main(int argc, char *argv[])
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.");
# Line 568 | Line 559 | main(int argc, char *argv[])
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;
# Line 582 | Line 583 | main(int argc, char *argv[])
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();

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)