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/src/ircd.c (file contents), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid/trunk/src/ircd.c (file contents), Revision 1798 by michael, Sun Mar 31 17:09:50 2013 UTC

# Line 24 | Line 24
24  
25   #include "stdinc.h"
26   #include "s_user.h"
27 < #include "tools.h"
27 > #include "list.h"
28   #include "ircd.h"
29   #include "channel.h"
30   #include "channel_mode.h"
31   #include "client.h"
32 #include "common.h"
32   #include "event.h"
33   #include "fdlist.h"
34   #include "hash.h"
35   #include "irc_string.h"
37 #include "sprintf_irc.h"
36   #include "ircd_signal.h"
39 #include "list.h"
37   #include "s_gline.h"
38   #include "motd.h"
39 < #include "ircd_handler.h"
43 < #include "msg.h"         /* msgtab */
39 > #include "conf.h"
40   #include "hostmask.h"
41   #include "numeric.h"
42   #include "packet.h"
43   #include "parse.h"
44   #include "irc_res.h"
45   #include "restart.h"
46 + #include "rng_mt.h"
47   #include "s_auth.h"
48   #include "s_bsd.h"
49 < #include "s_conf.h"
53 < #include "s_log.h"
49 > #include "log.h"
50   #include "s_misc.h"
51   #include "s_serv.h"      /* try_connections */
56 #include "s_stats.h"
52   #include "send.h"
53   #include "whowas.h"
54   #include "modules.h"
55   #include "memory.h"
56 + #include "mempool.h"
57   #include "hook.h"
58   #include "ircd_getopt.h"
63 #include "balloc.h"
59   #include "motd.h"
60   #include "supported.h"
61 <
62 < /* Try and find the correct name to use with getrlimit() for setting the max.
63 < * number of files allowed to be open by this process.
69 < */
61 > #include "watch.h"
62 > #include "conf_db.h"
63 > #include "conf_class.h"
64  
65   /* /quote set variables */
66   struct SetOptions GlobalSetOptions;
# Line 77 | Line 71 | struct config_file_entry ConfigFileEntry
71   struct server_info ServerInfo;
72   /* admin info set from ircd.conf */
73   struct admin_info AdminInfo = { NULL, NULL, NULL };
74 < struct Counter Count = { 0, 0, 0, 0, 0, 0, 0, 0 };
74 > struct Counter Count = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
75   struct ServerState_t server_state = { 0 };
76 < struct logging_entry ConfigLoggingEntry = { 1, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0} };
76 > struct logging_entry ConfigLoggingEntry = { .use_logging = 1 };
77 > struct ServerStatistics ServerStats;
78   struct timeval SystemTime;
79   struct Client me;             /* That's me */
80   struct LocalUser meLocalUser; /* That's also part of me */
86 unsigned long connect_id = 0; /* unique connect ID */
81  
88 static unsigned long initialVMTop = 0;   /* top of virtual memory at init */
82   const char *logFileName = LPATH;
83   const char *pidFileName = PPATH;
84  
85   char **myargv;
93 char ircd_platform[PLATFORMLEN];
86  
87   int dorehash = 0;
88   int doremotd = 0;
97 time_t nextconnect = 1;       /* time for next try_connections call */
89  
90   /* Set to zero because it should be initialized later using
91   * initialize_server_capabs
92   */
93   int default_server_capabs = 0;
94 <
95 < #ifdef HAVE_LIBCRYPTO
96 < int bio_spare_fd = -1;
106 < #endif
107 <
108 < int splitmode;
109 < int splitchecking;
110 < int split_users;
94 > unsigned int splitmode;
95 > unsigned int splitchecking;
96 > unsigned int split_users;
97   unsigned int split_servers;
98  
99   /* Do klines the same way hybrid-6 did them, i.e. at the
# Line 122 | Line 108 | unsigned int split_servers;
108  
109   int rehashed_klines = 0;
110  
125 /*
126 * get_vm_top - get the operating systems notion of the resident set size
127 */
128 #ifndef _WIN32
129 static unsigned long
130 get_vm_top(void)
131 {
132  /*
133   * NOTE: sbrk is not part of the ANSI C library or the POSIX.1 standard
134   * however it seems that everyone defines it. Calling sbrk with a 0
135   * argument will return a pointer to the top of the process virtual
136   * memory without changing the process size, so this call should be
137   * reasonably safe (sbrk returns the new value for the top of memory).
138   * This code relies on the notion that the address returned will be an
139   * offset from 0 (NULL), so the result of sbrk is cast to a size_t and
140   * returned. We really shouldn't be using it here but...
141   */
142
143  void *vptr = sbrk(0);
144  return((unsigned long)vptr);
145 }
111  
112   /*
113   * print_startup - print startup information
# Line 174 | Line 139 | make_daemon(void)
139  
140    setsid();
141   }
177 #endif
178
179 /*
180 * get_maxrss - get the operating systems notion of the resident set size
181 */
182 unsigned long
183 get_maxrss(void)
184 {
185 #ifdef _WIN32
186  return (0);   /* FIXME */
187 #else
188  return (get_vm_top() - initialVMTop);
189 #endif
190 }
142  
143   static int printVersion = 0;
144  
145 < struct lgetopt myopts[] = {
195 <  {"dlinefile",  &ConfigFileEntry.dlinefile,
196 <   STRING, "File to use for dline.conf"},
145 > static struct lgetopt myopts[] = {
146    {"configfile", &ConfigFileEntry.configfile,
147     STRING, "File to use for ircd.conf"},
148 +  {"glinefile",  &ConfigFileEntry.glinefile,
149 +   STRING, "File to use for gline database"},
150    {"klinefile",  &ConfigFileEntry.klinefile,
151 <   STRING, "File to use for kline.conf"},
151 >   STRING, "File to use for kline database"},
152 >  {"dlinefile",  &ConfigFileEntry.dlinefile,
153 >   STRING, "File to use for dline database"},
154    {"xlinefile",  &ConfigFileEntry.xlinefile,
155 <   STRING, "File to use for xline.conf"},
155 >   STRING, "File to use for xline database"},
156 >  {"resvfile",  &ConfigFileEntry.resvfile,
157 >   STRING, "File to use for resv database"},
158    {"logfile",    &logFileName,
159     STRING, "File to use for ircd.log"},
160    {"pidfile",    &pidFileName,
# Line 217 | Line 172 | set_time(void)
172   {
173    static char to_send[200];
174    struct timeval newtime;
220 #ifdef _WIN32
221  FILETIME ft;
222
223  GetSystemTimeAsFileTime(&ft);
224  if (ft.dwLowDateTime < 0xd53e8000)
225    ft.dwHighDateTime--;
226  ft.dwLowDateTime -= 0xd53e8000;
227  ft.dwHighDateTime -= 0x19db1de;
228
229  newtime.tv_sec  = (*(uint64_t *) &ft) / 10000000;
230  newtime.tv_usec = (*(uint64_t *) &ft) / 10 % 1000000;
231 #else
175    newtime.tv_sec  = 0;
176    newtime.tv_usec = 0;
177  
178    if (gettimeofday(&newtime, NULL) == -1)
179    {
180 <    ilog(L_ERROR, "Clock Failure (%s), TS can be corrupted",
180 >    ilog(LOG_TYPE_IRCD, "Clock Failure (%s), TS can be corrupted",
181           strerror(errno));
182 <    sendto_realops_flags(UMODE_ALL, L_ALL,
182 >    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
183                           "Clock Failure (%s), TS can be corrupted",
184                           strerror(errno));
185      restart("Clock Failure");
186    }
244 #endif
187  
188    if (newtime.tv_sec < CurrentTime)
189    {
190 <    ircsprintf(to_send, "System clock is running backwards - (%lu < %lu)",
191 <               (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
190 >    snprintf(to_send, sizeof(to_send),
191 >             "System clock is running backwards - (%lu < %lu)",
192 >             (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
193      report_error(L_ALL, to_send, me.name, 0);
194      set_back_events(CurrentTime - newtime.tv_sec);
195    }
# Line 281 | Line 224 | io_loop(void)
224        {
225          struct Client *client_p = ptr->data;
226          assert(client_p->localClient->list_task);
227 <        safe_list_channels(client_p, client_p->localClient->list_task, 0, 0);
227 >        safe_list_channels(client_p, client_p->localClient->list_task, 0);
228        }
229      }
230  
# Line 305 | Line 248 | io_loop(void)
248      if (doremotd)
249      {
250        read_message_file(&ConfigFileEntry.motd);
251 <      sendto_realops_flags(UMODE_ALL, L_ALL,
251 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
252                             "Got signal SIGUSR1, reloading ircd motd file");
253        doremotd = 0;
254      }
# Line 347 | Line 290 | initialize_global_set_options(void)
290    }
291  
292    GlobalSetOptions.ident_timeout = IDENT_TIMEOUT;
350  GlobalSetOptions.idletime = ConfigFileEntry.idletime;
293    /* End of global set options */
294   }
295  
# Line 361 | Line 303 | static void
303   initialize_message_files(void)
304   {
305    init_message_file(USER_MOTD, MPATH, &ConfigFileEntry.motd);
364  init_message_file(OPER_MOTD, OPATH, &ConfigFileEntry.opermotd);
306    init_message_file(USER_LINKS, LIPATH, &ConfigFileEntry.linksfile);
307  
308    read_message_file(&ConfigFileEntry.motd);
368  read_message_file(&ConfigFileEntry.opermotd);
309    read_message_file(&ConfigFileEntry.linksfile);
310  
311    init_isupport();
# Line 380 | Line 320 | static void
320   initialize_server_capabs(void)
321   {
322    add_capability("QS", CAP_QS, 1);
383  add_capability("LL", CAP_LL, 1);
323    add_capability("EOB", CAP_EOB, 1);
324 <  if (ServerInfo.sid != NULL)   /* only enable TS6 if we have an SID */
386 <    add_capability("TS6", CAP_TS6, 0);
387 <  add_capability("ZIP", CAP_ZIP, 0);
324 >  add_capability("TS6", CAP_TS6, 0);
325    add_capability("CLUSTER", CAP_CLUSTER, 1);
326 +  add_capability("SVS", CAP_SVS, 1);
327   #ifdef HALFOPS
328    add_capability("HOPS", CAP_HOPS, 1);
329   #endif
# Line 400 | Line 338 | initialize_server_capabs(void)
338   static void
339   write_pidfile(const char *filename)
340   {
341 <  FBFILE *fb;
341 >  FILE *fb;
342  
343 <  if ((fb = fbopen(filename, "w")))
343 >  if ((fb = fopen(filename, "w")))
344    {
345      char buff[32];
346      unsigned int pid = (unsigned int)getpid();
409    size_t nbytes = ircsprintf(buff, "%u\n", pid);
347  
348 <    if ((fbputs(buff, fb, nbytes) == -1))
349 <      ilog(L_ERROR, "Error writing %u to pid file %s (%s)",
348 >    snprintf(buff, sizeof(buff), "%u\n", pid);
349 >
350 >    if ((fputs(buff, fb) == -1))
351 >      ilog(LOG_TYPE_IRCD, "Error writing %u to pid file %s (%s)",
352             pid, filename, strerror(errno));
353  
354 <    fbclose(fb);
416 <    return;
354 >    fclose(fb);
355    }
356    else
357    {
358 <    ilog(L_ERROR, "Error opening pid file %s", filename);
358 >    ilog(LOG_TYPE_IRCD, "Error opening pid file %s", filename);
359    }
360   }
361  
# Line 432 | Line 370 | write_pidfile(const char *filename)
370   static void
371   check_pidfile(const char *filename)
372   {
373 < #ifndef _WIN32
436 <  FBFILE *fb;
373 >  FILE *fb;
374    char buff[32];
375    pid_t pidfromfile;
376  
377    /* Don't do logging here, since we don't have log() initialised */
378 <  if ((fb = fbopen(filename, "r")))
378 >  if ((fb = fopen(filename, "r")))
379    {
380 <    if (fbgets(buff, 20, fb) == NULL)
380 >    if (fgets(buff, 20, fb) == NULL)
381      {
382        /* log(L_ERROR, "Error reading from pid file %s (%s)", filename,
383         * strerror(errno));
# Line 458 | Line 395 | check_pidfile(const char *filename)
395        }
396      }
397  
398 <    fbclose(fb);
398 >    fclose(fb);
399    }
400    else if (errno != ENOENT)
401    {
402      /* log(L_ERROR, "Error opening pid file %s", filename); */
403    }
467 #endif
404   }
405  
406   /* setup_corefile()
# Line 496 | Line 432 | setup_corefile(void)
432   * side effects - setups SSL context.
433   */
434   static void
435 < init_ssl(void)
435 > ssl_init(void)
436   {
437   #ifdef HAVE_LIBCRYPTO
438    SSL_load_error_strings();
439    SSLeay_add_ssl_algorithms();
440  
441 <  ServerInfo.ctx = SSL_CTX_new(SSLv23_server_method());
506 <  if (!ServerInfo.ctx)
441 >  if ((ServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL)
442    {
443      const char *s;
444  
445 <    fprintf(stderr, "ERROR: Could not initialize the SSL context -- %s\n",
445 >    fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n",
446              s = ERR_lib_error_string(ERR_get_error()));
447 <    ilog(L_CRIT, "ERROR: Could not initialize the SSL context -- %s\n", s);
447 >    ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Server context -- %s\n", s);
448    }
449  
450 <  SSL_CTX_set_options(ServerInfo.ctx, SSL_OP_NO_SSLv2);
451 <  SSL_CTX_set_options(ServerInfo.ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
452 <  SSL_CTX_set_verify(ServerInfo.ctx, SSL_VERIFY_NONE, NULL);
450 >  SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
451 >  SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
452 >  SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_NONE, NULL);
453  
454 <  bio_spare_fd = save_spare_fd("SSL private key validation");
455 < #endif /* HAVE_LIBCRYPTO */
456 < }
454 >  if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
455 >  {
456 >    const char *s;
457  
458 < /* init_callbacks()
459 < *
460 < * inputs       - nothing
461 < * output       - nothing
462 < * side effects - setups standard hook points
463 < */
464 < static void
465 < init_callbacks(void)
466 < {
532 <  iorecv_cb = register_callback("iorecv", NULL);
533 <  iosend_cb = register_callback("iosend", NULL);
534 <  iorecvctrl_cb = register_callback("iorecvctrl", NULL);
535 <  iosendctrl_cb = register_callback("iosendctrl", NULL);
458 >    fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n",
459 >            s = ERR_lib_error_string(ERR_get_error()));
460 >    ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Client context -- %s\n", s);
461 >  }
462 >
463 >  SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
464 >  SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
465 >  SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_NONE, NULL);
466 > #endif /* HAVE_LIBCRYPTO */
467   }
468  
469   int
# Line 541 | Line 472 | main(int argc, char *argv[])
472    /* Check to see if the user is running
473     * us as root, which is a nono
474     */
544 #ifndef _WIN32
475    if (geteuid() == 0)
476    {
477      fprintf(stderr, "Don't run ircd as root!!!\n");
478 <    return(-1);
478 >    return -1;
479    }
480  
481    /* Setup corefile size immediately after boot -kre */
482    setup_corefile();
483  
554  /* set initialVMTop before we allocate any memory */
555  initialVMTop = get_vm_top();
556 #endif
557
484    /* save server boot time right away, so getrusage works correctly */
485    set_time();
486  
487 <    /* It ain't random, but it ought to be a little harder to guess */
488 <  srand(SystemTime.tv_sec ^ (SystemTime.tv_usec | (getpid() << 20)));
489 <  memset(&me, 0, sizeof(me));
564 <  memset(&meLocalUser, 0, sizeof(meLocalUser));
487 >  /* It ain't random, but it ought to be a little harder to guess */
488 >  init_genrand(SystemTime.tv_sec ^ (SystemTime.tv_usec | (getpid() << 20)));
489 >
490    me.localClient = &meLocalUser;
491    dlinkAdd(&me, &me.node, &global_client_list); /* Pointer to beginning
492                                                     of Client list */
568
569  memset(&ServerInfo, 0, sizeof(ServerInfo));
570
493    /* Initialise the channel capability usage counts... */
494    init_chcap_usage_counts();
495  
496    ConfigFileEntry.dpath      = DPATH;
497 <  ConfigFileEntry.configfile = CPATH;  /* Server configuration file */
498 <  ConfigFileEntry.klinefile  = KPATH;  /* Server kline file         */
499 <  ConfigFileEntry.xlinefile  = XPATH;  /* Server xline file         */
500 <  ConfigFileEntry.rxlinefile = RXPATH; /* Server regex xline file   */
501 <  ConfigFileEntry.rklinefile = RKPATH; /* Server regex kline file   */
502 <  ConfigFileEntry.dlinefile  = DLPATH; /* dline file                */
503 <  ConfigFileEntry.glinefile  = GPATH;  /* gline log file            */
582 <  ConfigFileEntry.cresvfile  = CRESVPATH; /* channel resv file      */
583 <  ConfigFileEntry.nresvfile  = NRESVPATH; /* nick resv file         */
497 >  ConfigFileEntry.configfile = CPATH;    /* Server configuration file */
498 >  ConfigFileEntry.klinefile  = KPATH;    /* Server kline file         */
499 >  ConfigFileEntry.glinefile  = GPATH;    /* Server gline file         */
500 >  ConfigFileEntry.xlinefile  = XPATH;    /* Server xline file         */
501 >  ConfigFileEntry.dlinefile  = DLPATH;   /* dline file                */
502 >  ConfigFileEntry.resvfile   = RESVPATH; /* resv file                 */
503 >
504    myargv = argv;
505    umask(077);                /* better safe than sorry --SRB */
506  
# Line 598 | Line 518 | main(int argc, char *argv[])
518      exit(EXIT_FAILURE);
519    }
520  
521 <  init_ssl();
521 >  ssl_init();
522  
603 #ifndef _WIN32
523    if (!server_state.foreground)
524    {
525      make_daemon();
# Line 610 | Line 529 | main(int argc, char *argv[])
529      print_startup(getpid());
530  
531    setup_signals();
613 #endif
614
615  get_ircd_platform(ircd_platform);
532  
533    /* Init the event subsystem */
534    eventInit();
535    /* We need this to initialise the fd array before anything else */
536    fdlist_init();
537 <  init_log(logFileName);
537 >  log_add_file(LOG_TYPE_IRCD, 0, logFileName);
538    check_can_use_v6();
539    init_comm();         /* This needs to be setup early ! -- adrian */
540    /* Check if there is pidfile and daemon already running */
541    check_pidfile(pidFileName);
542  
543 < #ifndef NOBALLOC
628 <  initBlockHeap();
629 < #endif
543 >  mp_pool_init();
544    init_dlink_nodes();
631  init_callbacks();
545    initialize_message_files();
546    dbuf_init();
547 <  init_hash();
547 >  hash_init();
548    init_ip_hash_table();      /* client host ip hash table */
549    init_host_hash();          /* Host-hashtable. */
550 <  clear_tree_parse();
551 <  init_client();
552 <  init_class();
553 <  init_whowas();
554 <  init_stats();
550 >  client_init();
551 >  class_init();
552 >  whowas_init();
553 >  watch_init();
554 >  auth_init();          /* Initialise the auth code */
555 >  init_resolver();      /* Needs to be setup before the io loop */
556 >  modules_init();
557    read_conf_files(1);   /* cold start init conf files */
643  initServerMask();
644  me.id[0] = '\0';
558    init_uid();
646  init_auth();          /* Initialise the auth code */
647 #ifndef _WIN32
648  init_resolver();      /* Needs to be setup before the io loop */
649 #endif
559    initialize_server_capabs();   /* Set up default_server_capabs */
560    initialize_global_set_options();
561 <  init_channels();
561 >  channel_init();
562  
563 <  if (ServerInfo.name == NULL)
563 >  if (EmptyString(ServerInfo.sid))
564    {
565 <    ilog(L_CRIT, "No server name specified in serverinfo block.");
565 >    ilog(LOG_TYPE_IRCD, "ERROR: No server id specified in serverinfo block.");
566      exit(EXIT_FAILURE);
567    }
568 +
569 +  strlcpy(me.id, ServerInfo.sid, sizeof(me.id));
570 +
571 +  if (EmptyString(ServerInfo.name))
572 +  {
573 +    ilog(LOG_TYPE_IRCD, "ERROR: No server name specified in serverinfo block.");
574 +    exit(EXIT_FAILURE);
575 +  }
576 +
577    strlcpy(me.name, ServerInfo.name, sizeof(me.name));
578  
579    /* serverinfo{} description must exist.  If not, error out.*/
580 <  if (ServerInfo.description == NULL)
580 >  if (EmptyString(ServerInfo.description))
581    {
582 <    ilog(L_CRIT,
665 <      "ERROR: No server description specified in serverinfo block.");
582 >    ilog(LOG_TYPE_IRCD, "ERROR: No server description specified in serverinfo block.");
583      exit(EXIT_FAILURE);
584    }
585 +
586    strlcpy(me.info, ServerInfo.description, sizeof(me.info));
587  
588 <  me.from    = &me;
589 <  me.servptr = &me;
588 >  me.from                   = &me;
589 >  me.servptr                = &me;
590 >  me.localClient->lasttime  = CurrentTime;
591 >  me.localClient->since     = CurrentTime;
592 >  me.localClient->firsttime = CurrentTime;
593  
594    SetMe(&me);
595    make_server(&me);
596  
597 <  me.lasttime = me.since = me.firsttime = CurrentTime;
597 >  hash_add_id(&me);
598    hash_add_client(&me);
599    
600    /* add ourselves to global_serv_list */
601    dlinkAdd(&me, make_dlink_node(), &global_serv_list);
602  
603 <  check_class();
603 >  load_kline_database();
604 >  load_dline_database();
605 >  load_gline_database();
606 >  load_xline_database();
607 >  load_resv_database();
608  
684 #ifndef STATIC_MODULES
609    if (chdir(MODPATH))
610    {
611 <    ilog (L_CRIT, "Could not load core modules. Terminating!");
611 >    ilog(LOG_TYPE_IRCD, "Could not load core modules. Terminating!");
612      exit(EXIT_FAILURE);
613    }
614  
615    load_all_modules(1);
616    load_conf_modules();
617    load_core_modules(1);
618 +
619    /* Go back to DPATH after checking to see if we can chdir to MODPATH */
620 <  chdir(ConfigFileEntry.dpath);
621 < #else
622 <  load_all_modules(1);
623 < #endif
620 >  if (chdir(ConfigFileEntry.dpath))
621 >  {
622 >    perror("chdir");
623 >    exit(EXIT_FAILURE);
624 >  }
625 >
626    /*
627     * assemble_umode_buffer() has to be called after
628     * reading conf/loading modules.
# Line 704 | Line 631 | main(int argc, char *argv[])
631  
632    write_pidfile(pidFileName);
633  
634 <  ilog(L_NOTICE, "Server Ready");
634 >  ilog(LOG_TYPE_IRCD, "Server Ready");
635  
636    eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
637    eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);
# Line 713 | Line 640 | main(int argc, char *argv[])
640    /* No, 'cause after a restart it would cause all sorts of nick collides */
641    eventAddIsh("try_connections", try_connections, NULL, STARTUP_CONNECTIONS_TIME);
642  
716  eventAddIsh("collect_zipstats", collect_zipstats, NULL, ZIPSTATS_TIME);
717
643    /* Setup the timeout check. I'll shift it later :)  -- adrian */
644    eventAddIsh("comm_checktimeouts", comm_checktimeouts, NULL, 1);
645  
646 +  eventAddIsh("save_all_databases", save_all_databases, NULL, DATABASE_UPDATE_TIMEOUT);
647 +
648    if (ConfigServerHide.links_delay > 0)
649      eventAddIsh("write_links_file", write_links_file, NULL, ConfigServerHide.links_delay);
650    else
# Line 727 | Line 654 | main(int argc, char *argv[])
654      eventAddIsh("check_splitmode", check_splitmode, NULL, 60);
655  
656    io_loop();
657 <  return(0);
657 >  return 0;
658   }

Comparing:
ircd-hybrid/src/ircd.c (property svn:keywords), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid/trunk/src/ircd.c (property svn:keywords), Revision 1798 by michael, Sun Mar 31 17:09:50 2013 UTC

# Line 1 | Line 1
1 < Revision
1 > Id Revision

Diff Legend

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